<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0414)http://www7.53kf.com/webCompany.php?arg=9005190&style=1&kflist=off&kf=gl-002%2Cgl-004%2Cgl-009%2Cgl-001%2Cgl-007%2Cgl-003%2C237084399%40qq.com&zdkf_type=1&language=zh-cn&charset=gbk&username=&userinfo=&introurl=&lyurl=&lytype=0&copartner=&referer=http%3A%2F%2Fwww.bjjfr.com%2Fworks%2F&keyword=&brief=&logo=&question=&tfrom=2&tpl=minichat2&timeStamp=1472697968458&interface_color=9&interface_theme=8&minchat_style=1 -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>金夫人婚纱摄影 - 网页对话 - powered by 53kf.com</title>
<meta name="keywords" content="免费在线客服系统,免费网站客服系统,免费网上客服系统,网页对话,网页聊天">
<meta name="description" content="免费在线客服系统,免费网站客服系统,免费网上客服系统,网页对话,网页聊天">
<link href="./base(1).css" rel="stylesheet" type="text/css">
<link href="./minichat.css" rel="stylesheet" type="text/css">
<script>
var company_id = "70777085";
var obj_id = 0; // 客服ID
var myid = "-1"; // 访客id
var system_version = 'zuyong'; // gongsi:公司内测版 zuyong:外网租用版
var enable_debug = '0'; // 系统调试   1:开 0:关
var enable_js_error = '0'; // JS报错提示 1:开 0:关
var enable_talk_collection = "1";  // 通讯采集开关 1:开启 0:关闭
// 改进版插入错误信息
function insertErrorInfos2(err_from, err_type, err_detail)
{
	if (enable_debug == 0) return;
	var httprequest;
	if (window.XMLHttpRequest)
	{
		httprequest = new XMLHttpRequest();
	}
	else
	{
		httprequest = new ActiveXObject("Microsoft.XMLHTTP");
	}

  try
  {
    if(httprequest!=null)
    {
      err_from = window.encodeURIComponent(err_from);
      err_type = window.encodeURIComponent(err_type);
      err_detail = window.encodeURIComponent(err_detail);
      var senddata = "err_from="+err_from+"&err_type="+err_type+"&err_detail="+err_detail+"&company_id="+company_id+"&id6d="+obj_id;
      var url = "err_infos.php";
      httprequest.open("POST", url, true);
      httprequest.setRequestHeader("Content-Length", senddata.length);
      httprequest.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
      httprequest.send(senddata);

      httprequest.onreadystatechange = function()
      {
        if(4==httprequest.readyState)
        {
          if(200==httprequest.status)
          {
            //alert(httprequest.responseText);
            //var dom = httprequest.responseXML;
          }
        }
      }
    }
  }
  catch(e){}
}

//页面脚本错误捕捉
window.onerror = function(msg,url,line) {
	//insertErrorInfos2('2','windowError','{msg:"' + msg + '",url:"'+ url + '",line:"' + line + '",browser:"' + navigator.userAgent + '","time:"' + (new Date().getTime()) + '",guest_id:"' + myid + '"}');
	if (enable_js_error == 0) return true;
}
//运维监控平台相关
var client_IP = '1.202.83.17';
var timeStamp = 1472697968458; // 开始时间 毫秒
if (timeStamp <= 0 || Math.abs(timeStamp - new Date().getTime()) > 100000) timeStamp = new Date().getTime();
var monitor_url = 'http://mon.53rj.com.cn/sendmon.jsp';
</script>
<link rel="stylesheet" type="text/css" href="./code.css"></head><body onbeforeunload="" onload="initial(&#39;minchat&#39;)" onunload="window_unload();" oncontextmenu="self.event.returnValue=false"><div id="vote_div" style="top: 99px; left: 23px; height: 180px; width: 358px; position: absolute; font-size: 14px; z-index: 9999;"><table width="358" height="210" border="0" cellpadding="0" cellspacing="4" background="./tijiao_4.gif"><tbody><tr><td height="15" align="right" valign="middle"><a href="http://www7.53kf.com/webCompany.php?arg=9005190&amp;style=1&amp;kflist=off&amp;kf=gl-002%2Cgl-004%2Cgl-009%2Cgl-001%2Cgl-007%2Cgl-003%2C237084399%40qq.com&amp;zdkf_type=1&amp;language=zh-cn&amp;charset=gbk&amp;username=&amp;userinfo=&amp;introurl=&amp;lyurl=&amp;lytype=0&amp;copartner=&amp;referer=http%3A%2F%2Fwww.bjjfr.com%2Fworks%2F&amp;keyword=&amp;brief=&amp;logo=&amp;question=&amp;tfrom=2&amp;tpl=minichat2&amp;timeStamp=1472697968458&amp;interface_color=9&amp;interface_theme=8&amp;minchat_style=1#" onclick="cancel_vote();return false;"><img src="./tijiao_10.gif" width="15" height="15" border="0"></a></td></tr><tr><td align="left" height="30" style="word-break:break-all;font-size: 12px;padding-left:5px;padding-right:5px;padding-top:10px;">很抱歉，由于您长时间未咨询，系统结束了本次服务，请对本次服务评价。若您仍需其他服务，请再次联系客服。</td></tr><tr><td height="20" align="center" valign="bottom" style="font-size: 12px;color: #000000;"><input name="vote" type="radio" value="0" checked="" onclick="set_vote_value(this.value)">满意  <input name="vote" type="radio" value="1" onclick="set_vote_value(this.value)">较好  <input name="vote" type="radio" value="2" onclick="set_vote_value(this.value)">一般  <input name="vote" type="radio" value="3" onclick="set_vote_value(this.value)">较差  <input name="vote" type="radio" value="4" onclick="set_vote_value(this.value)">恶劣  </td></tr><tr><td height="60" align="center" valign="top"><table width="85%" height="55" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 12px;color: #000000;"><tbody><tr><td width="50" align="center">建议</td><td><textarea style="width:235px; height:50px" id="vote_note" name="vote_note"></textarea></td></tr></tbody></table><span style="color:red;font-size:12px;height:12px;">*字数控制在150字以内</span></td></tr><tr><td height="32" align="center" valign="top"><input type="button" value="给客服评分" onclick="save_vote()"></td></tr></tbody></table></div><div id="vote_freeze" style="top: 0px; left: 0px; height: 378px; width: 403px; border: none; position: absolute; margin: 0px; padding: 0px; z-index: 9998; opacity: 0.2; background-color: rgb(0, 0, 0);"><div style="position:absolute;z-index:-1;left:-1px;top:0;width:100%;height:100%;"><iframe style="background:#000;width:100%;height:100%;filter:alpha(opacity=0);-moz-opacity:0;" frameborder="0" src="./saved_resource(2).html"></iframe></div></div><div style="z-index:-100;height:0px;visibility: hidden;">
  <span id="plugin_snapshot" style="display: none;"></span>
  <iframe id="kh_gid" name="kh_gid" src="./iframe_set_gid.html" width="1" height="1" frameborder="0"></iframe>
  <iframe id="scan_speed" name="scan_speed" src="./saved_resource(3).html" width="1" height="1" frameborder="0"></iframe>
</div>
<iframe id="iframe_fav" src="./iframe_fav.html" style="display:none"></iframe>
<div id="iefav" class="hslice" style="display:none"><div class="entry-title">[金夫人婚纱摄影]</div></div><input type="hidden" id="kh_has_import" name="kh_has_import" value="0">


<div id="body" style="border-color: rgb(0, 154, 194);">
  <div id="div_vote" style="display:none;border:1px #999999 solid ; z-index: 200; width: 380px; height: 240px; position: absolute; left: 200px; top: 100px;font-size:12px; background-color:#fff;">
  <table width="380" border="0" align="left" cellpadding="0" cellspacing="0" style="font-size:12px;padding-left:10px;">
    <tbody>
      <tr> <td width="378" height="30" align="center" bgcolor="#F5F5F5" style="font-size:14px;font-weight:bold;border-bottom:1px #CCCCCC solid;"> </td> 
      </tr>
      <tr><td height="30" style="font-weight:bold;"></td> 
      </tr>
      <tr>
        <td height="30">
          <input id="pf1" name="pf" value="1" type="radio">满意  
          <input id="pf2" name="pf" value="2" type="radio">较好  
          <input id="pf3" name="pf" value="3" type="radio">一般  
          <input id="pf4" name="pf" value="4" type="radio">较差  
          <input id="pf5" name="pf" value="5" type="radio">恶劣  
        </td>
      </tr>
      <tr> <td valign="middle" height="30" style="font-weight:bold;"></td> 
      </tr>
      <tr>
        <td>
          <textarea rows="8" cols="42" name="note" id="note" style="border: 1px solid #CCCCCC; font-size: 12pt; width: 360px; height: 85px;"></textarea>
        </td>
      </tr>
      <tr> <td height="5"> </td> </tr>
      <tr>
        <td id="td_19" align="center">
          <a style="" onclick="return save_vote()" href="http://www7.53kf.com/webCompany.php?arg=9005190&amp;style=1&amp;kflist=off&amp;kf=gl-002%2Cgl-004%2Cgl-009%2Cgl-001%2Cgl-007%2Cgl-003%2C237084399%40qq.com&amp;zdkf_type=1&amp;language=zh-cn&amp;charset=gbk&amp;username=&amp;userinfo=&amp;introurl=&amp;lyurl=&amp;lytype=0&amp;copartner=&amp;referer=http%3A%2F%2Fwww.bjjfr.com%2Fworks%2F&amp;keyword=&amp;brief=&amp;logo=&amp;question=&amp;tfrom=2&amp;tpl=minichat2&amp;timeStamp=1472697968458&amp;interface_color=9&amp;interface_theme=8&amp;minchat_style=1#"></a>
          <a style="margin-left: 20px;" onclick="return hidden_vote();" href="http://www7.53kf.com/webCompany.php?arg=9005190&amp;style=1&amp;kflist=off&amp;kf=gl-002%2Cgl-004%2Cgl-009%2Cgl-001%2Cgl-007%2Cgl-003%2C237084399%40qq.com&amp;zdkf_type=1&amp;language=zh-cn&amp;charset=gbk&amp;username=&amp;userinfo=&amp;introurl=&amp;lyurl=&amp;lytype=0&amp;copartner=&amp;referer=http%3A%2F%2Fwww.bjjfr.com%2Fworks%2F&amp;keyword=&amp;brief=&amp;logo=&amp;question=&amp;tfrom=2&amp;tpl=minichat2&amp;timeStamp=1472697968458&amp;interface_color=9&amp;interface_theme=8&amp;minchat_style=1#">
          
         </a>
        </td>
      </tr>
    </tbody>
  </table>
</div>

<div id="flashbox" style="width:1px;height:1px;">


  <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="1" height="1" align="middle" id="im">
    <param name="allowScriptAccess" value="always">
    <param name="movie" value="53kf/guest.swf">
    <param name="quality" value="high">
    <param name="bgcolor" value="#ffffff">
    <embed name="im" src="53kf/guest.swf" quality="high" bgcolor="#ffffff" width="1" height="1" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" swliveconnect="true">
  </object>

</div>
<script type="text/javascript">
function thisMovie(movieName){
  if(navigator.appName.indexOf("Microsoft")!=-1){
	if(navigator.appVersion.match(/10./i)=='10.' || navigator.appVersion.match(/9./i)=='9.')
	{
	return document[movieName];
	}else{ 
    return window[movieName];}
  }else{
    return document[movieName];
  }
}
</script>  <div id="table" style="background:#fff;">
    <div id="ornament_2" class="ornament_2" style="border-color: rgb(0, 154, 194);"></div>
    <div id="part_main">
      <div id="part_leaveword" class="part_leaveword" style="z-index:2; display:none">
        <div class="leaveword_clue"><span id="infos_11">客服不在线</span></div>
        <div class="leaveword_content">
          <div class="leaveword_msg">
            
          </div>
          <div id="ly_items"></div>
        </div>
      </div>
      <div id="res_leaveword" class="part_leaveword" style="background-color:#fff; display:none; z-index:2;">
        <table width="100%" height="100%">
          <tbody><tr>
            <td valign="middle" align="center" id="res_tip" style="font-size:14px;"><!--显示留言结果--></td>
          </tr>
        </tbody></table>
      </div>
      <div class="part_dialog">
        <div id="dialog_clue" class="dialog_clue" style="background-image: url(&quot;style/chat/minichat2/img/minchat_ns_9.png&quot;);">
        <span id="l-ts-wd" class="">对话结束</span>
        <span id="l-ts-close">&nbsp;</span></div>
        <div id="dialog_clue2" class="dialog_clue2">&nbsp;</div>
        <div id="dialog_content_bg" class="dialog_content_bg" style="background: url(&quot;style/setting/ver06/img/suspend/theme_bg8.png&quot;);"><div class="dialog_content_bg2"></div></div>
        <div class="dialog_content" id="box-main-l-disp"><div><p><img src="./201608162024352612.jpg" alt=""><br></p><p><span style="font-family:Microsoft YaHei;">欢迎光临金夫人婚纱摄影官方旗舰店</span></p></div><br><div class="kefu"><p>金夫人程程&nbsp;10:46:09</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><div><div><span style="font-size: 16px;"><span style="color:#3333ff;"><span style="font-size:13px;"><span style="font-family:微软雅黑;color:#000000;">亲，您是想咨询</span><span style="font-family:微软雅黑;">婚纱照</span><span style="font-family:微软雅黑;color:#000000;">还是写真呢？</span></span></span></span></div></div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:46:19</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><div><!--StartFragment --><div><div><!--StartFragment --><div><div><span style="font-family:Microsoft YaHei;"><!--StartFragment --><span style="font-size:13px;"></span></span></div></div><div><!--StartFragment --><div><span style="font-family:Microsoft YaHei;font-size:16px;"><span style="font-family:Microsoft YaHei;font-size:13px;">洪荒女神，助力奥运——中国夺冠你就免单 <br>NO.1 支付一元，升级明星婚纱（火爆中）<br>NO.2 支付199元，冠军套系再减1000（已开启）<br>NO.3 奥运福利大礼10000元（即将开启）<br>NO.4 三场赛事夺冠有礼，共享奥运赛程（期待中）<br>NO.5 体育事业全民共享，1880元答谢礼<br>NO.6 全部免单 费用退还 （期待中）</span></span>﻿﻿</div></div></div></div></div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:46:29</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><div><div><!--StartFragment --><div><span style="font-family:Microsoft YaHei;font-size:13px;">亲，您打算什么时候拍呢？快来开启您的洪荒之力吧，婚照爆省10000元呢~</span></div><div>﻿﻿</div></div></div><div style="top: 0px;">﻿﻿</div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:46:39</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><div><span style="font-family:Arial;font-size:13px;"></span><div><span style="font-family:Microsoft YaHei;font-size:16px;"></span><div></div></div></div><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><div><div><span style="font-family:Arial;"><!--StartFragment --></span><div><span style="font-family:Arial;"><span style="font-size:13px;"><span style="font-family:Microsoft YaHei;">亲爱的，10月档期已开启，新风格新场景限时报名中，每天开放7组哦~</span><br></span></span></div><div>﻿﻿﻿﻿﻿</div></div></div></div></div></div></div></div><div style="top: 0px;">﻿﻿</div><div style="top: 0px;">﻿﻿</div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:46:49</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><div><span style="font-family:Microsoft YaHei;font-size:16px;"><span style="font-size:13px;"><!--StartFragment --></span></span><div><span style="font-family:Microsoft YaHei;font-size:13px;"><!--StartFragment --></span><div><span style="font-family:Microsoft YaHei;font-size:13px;">亲爱哒，方便加您QQ或微信吗，我把最新照片发给您看看，有喜欢的话，我再给您详情介绍哦！</span>﻿﻿</div></div></div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:46:59</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><span style="font-size:13px;"><!--StartFragment --></span><div><span style="font-family:Microsoft YaHei;">亲，<span style="color:#cc0000;">奥运活动</span>力度超大呢，金夫人拍案，中国金牌总数第一，全部免单费用退还哦！</span></div><div>﻿﻿</div><div style="top: 0px;">﻿﻿</div></div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:47:09</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><span style="color: rgb(51, 51, 255);"><span style="color: rgb(0, 0, 0);"><span style="font-family:Microsoft YaHei;font-size:13px;"><span style="font-family:Microsoft YaHei;font-size:16px;"><span style="font-size:13px;">亲，在吗？ 我不是机器人哦,我在等您回复哦！</span></span></span></span></span> </div></div><div class="kefu"><p>金夫人程程&nbsp;&nbsp;10:47:19</p><b class="g-arrows"><img src="./kefu_arrow1.png"></b><div class="chat_word"><span style="color:#000099;"></span><div><span style="font-family:Microsoft YaHei;"><span style="font-size:16px;"><span style="font-size:13px;color:#000000;">亲&nbsp; 您有什么问题可以随时问我哦！我给您简单的介绍一下，比您自己看更好呢！您也可以加我QQ：&nbsp;&nbsp;657537328<img src="./53b_35.gif" border="0"></span>﻿﻿﻿</span></span>﻿﻿</div></div></div><img src="./info_tip.gif" height="16" width="16"><font style="color:#1B1D74">【系统提示】抱歉，由于您长时间未在线，客服暂时断开与您的联系，期待您再次光临金夫人婚纱摄影！</font><br><br>感谢您的咨询！谢谢，再见！<br><br></div>
      </div>
      <div id="part_buttons" class="part_buttons" style="z-index: 1; background-image: url(&quot;style/chat/minichat2/img/minchat_ns_9.png&quot;);">
        <div class="wkbutton_1" onclick="toinsertsmile()" title="表情"></div>        <div class="wkbutton_2" onclick="toinsertlink()" title="链接"></div>
        <div class="wkbutton_3" onclick="toinsertimg()" title="图片"></div>
                        <div class="wkbutton_6" onclick="to_vote_open()" title="请给我们的服务打分"></div>        <div class="wkbutton_7" onclick="saveas()" title="保存聊天记录"></div>        <div id="quickQA" class="wkbutton_8" onclick="quickQA(this)" title="快速提问" style="display: none;"></div>
        <div style="margin-top:5px;margin-right:10px;text-align:right"><span style="font-family:&#39;宋体&#39;"><a href="http://www.53kf.com/?controller=phone_download&amp;action=download&amp;file=53KF-tousushenqing.xlsx" title="如果您认为权益受到侵害，请点击此处" target="_blank">
          侵权投诉</a></span></div>
        <div style="clear:both;"></div>
      </div>
      <div class="part_input" style="z-index:1">
        <div class="part_input_content" id="part_input_content">
          <textarea name="textarea" id="input1" onpropertychange="try{textCounter(this,1000)}catch(e){}" onkeypress="return keypress(event);" onkeydown="return keydown(event)"></textarea>
          <div id="clue" style="display:none">金夫人程程 正在输入消息</div>
          <div id="send" class="chatmini_btns" style="background-image: url(&quot;style/chat/minichat2/img/minchat_ns_9.png&quot;);"><span id="chatmini_btns_s" class="chatmini_btns_s" onclick="sendmsg()">发送</span><span class="chatmini_btns_p" title="设置快捷键" onclick="showpkset()">&nbsp;</span></div>
        </div>
      </div>
      
      <!-- send tips  -->
      <div id="send_tips" style="display:none"></div>
    </div>
    <div class="press_top" id="press_top" style="z-index: 0;">
      <div id="pressdiv" style="display:none">
        <div id="line1" class="pressdiv-line" onclick="setpostkey(1)" onmousemove="changeclass(&#39;over&#39;,&#39;line1&#39;)" onmouseout="changeclass(&#39;out&#39;,&#39;line1&#39;)">
          <div id="line1-left" class="pressdiv-line-left pkselect"></div>
          <div class="pressdiv-line-right text-l" id="infos_20">按Enter键发送</div>
        </div>
        <div id="line2" class="pressdiv-line" onclick="setpostkey(2)" onmousemove="changeclass(&#39;over&#39;,&#39;line2&#39;)" onmouseout="changeclass(&#39;out&#39;,&#39;line2&#39;)">
          <div id="line2-left" class="pressdiv-line-left"></div>
          <div class="pressdiv-line-right text-l" id="infos_21">按Ctrl+Enter键发送</div>
        </div>
      </div>
    </div>
    <div id="uploaddiv" style="display:none">
      <iframe id="upload_iframe" src="./saved_resource(4).html" style="width:360px;" marginwidth="0" marginheight="0" height="80" scrolling="no" hspace="0" vspace="0" frameborder="0"></iframe>
    </div>
    <div id="face_div" style="display:none">
      <iframe id="face_src" src="./saved_resource(5).html" style="width:302px;height:214px;" frameborder="0"></iframe>
    </div>
  </div>
</div>

<script>
    var inter_color = 9;
    var inter_theme = 8;
</script>
<style>
.me{text-align:right; margin-bottom:20px; margin-left:60px;margin-right: 5px;overflow: hidden;}
.me .chat_word{ background:#56aee2; line-height:1.2; margin:0; text-align:left; padding:5px 10px; color:#fff;border-radius:5px;float: right;}
.me .g-arrows{ margin:0; padding:0;display: block;}
.me .g-arrows img{ margin-right:8px;}
.me p,.td_macth .kefu p{ color:#666;}

.kefu{text-align:left; margin-bottom:20px; margin-right:60px;overflow: hidden;}
.kefu p{padding-left:0px;}
.kefu .chat_word{ background:#F1F8F9;  line-height:1.2; margin:0; text-align:left; padding:5px 10px;border-radius:5px;float: left;}
.kefu .g-arrows{ margin:0; padding:0;display: block;}
.kefu .g-arrows img{ margin-left:8px;}
.span-link {
  text-decoration:none;
}
</style>
<script type="text/javascript">
try{
  var http_pro = (document.location.protocol == 'https:')?'https://':'http://';//区分HTTP和HTTPS
  var infos = new Array();
      infos.push("网络故障，无法连接服务器");
      infos.push("连接失败");
      infos.push("连接已断开，无法发送消息");
      infos.push("连接已断开");
      infos.push("的客服助手");
      infos.push("客服不在线，请留言");
      infos.push("占线请稍候");
      infos.push("对不起！线路忙，请稍候。您也可以给我们留言。");
      infos.push("说");
      infos.push("与...交谈中");
      infos.push("客服已离线，请留言<br>为便于我们与您联系，请注明您的姓名和联系方式。谢谢！");
      infos.push("客服不在线");
      infos.push("对话结束");
      infos.push("我");
      infos.push("链接地址");
      infos.push("链接文字");
      infos.push("请输入图片地址:");
      infos.push("公告建议");
      infos.push("连接中请稍候");
      infos.push("连接中，无法发送消息");
      infos.push("按Enter键发送");
      infos.push("按Ctrl+Enter键发送");
      infos.push("您已经打开了一个窗口咨询，不允许同时开两个窗口");
      infos.push("不在线，以下是客服助手的自动应答");
      infos.push("无此客服");
      infos.push("离线");
      infos.push("正在输入消息");
      infos.push("如果离开，您将无法继续接收客服的消息！");
      infos.push("如果没有留下联系方式，客服将无法联系您！");
      infos.push("系统提示");
      infos.push("等待您选择客服人员");
      infos.push("在线");
      infos.push("留言");
      infos.push("无法连接客服，您已被阻止");
      infos.push("网页对话");
      infos.push("请输入HTML代码:");
      infos.push("感谢您的咨询！请点击“取消”给客服评分");
      infos.push("评分");
      infos.push("感谢您的评分");
      infos.push("您已经评过分！");
      infos.push("没有建立对话，不能发送文件");
      infos.push("文件正在传送中");
      infos.push("正在传送文件");
      infos.push("传送成功");
      infos.push("发送文件给您");
      infos.push("点击接收保存");
      infos.push("您指定的客服不在线！<br>您可以给客服<span class='span-link' onclick='to_rec();' title='请在信息输入框中发送留言'> 留言 </span>或者选择<span class='span-link' onclick='showauto()'> 客服助手 </span>的帮助！<br>如果您要选择其他客服人员进行对话，请<span class='span-link' onclick='to_main_kf()'> 返回 </span>。");
      infos.push("您也可以选择<span class='span-link' onclick='showauto()'> 客服助手 </span>的帮助。");
      infos.push("请在此发送留言！");
      infos.push("感谢您的评分，我将继续为您服务！");
      infos.push("尚未与客服建立对话，不能评分!");
      infos.push("请填写你的姓名！");
      infos.push("请填写你的电子信箱！");
      infos.push("请填写你的电话号码或手机号码！（固定电话必须填写区号，中间不可有“－”如：0571－87858665 应该填写为 057187858665）");
      infos.push("请填写你的电话号码或手机号码！");
      infos.push("请填写你的qq！");
      infos.push("请填写留言内容！");
      infos.push("自助答疑助手");
      infos.push("系统自动回复");
      infos.push("秒后自动为您分配客服接待...");
      infos.push("空闲");
      infos.push("正常");
      infos.push("繁忙");
      infos.push("占线");
      infos.push("未分配部门");
      infos.push("您选择的客服不在线！\r\n点“确定”进入留言，“取消”重新选择其他客服");
      infos.push("您正排在队列的第");
      infos.push("位，请稍候...");
      infos.push("如果您不想继续等待，也可以<span class='span-link' onclick='talkWithOthers()'><b>咨询其他客服</b></span>或<span class='span-link' onclick='getWlist(1)'><b>给客服人员留言</b></span>");
      infos.push("<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>如果不是太复杂的问题，我也可以为您<span class='span-link' onclick='showzsk()'><b>立刻解答</b></span></span><br/>");
      infos.push("文件传送成功！");
      infos.push("给客服评分");
      infos.push("<img src='style/chat/crystal_blue/img/machine.gif' style='float:left;'><span style='position:relative; left:2px; top:8px;'>您好，我是智能机器人小Q<br/><br/>管理中心设置问候语</span><br/><br/>");
      infos.push("&nbsp;&nbsp;&nbsp;请选择您想咨询的问题分类");
      infos.push("有如下热门问题:");
      infos.push("小Q 说:");
      infos.push("所有分类");
      infos.push("&nbsp;&nbsp;&nbsp;您是不是想咨询这些问题:");
      infos.push("<tr><td align='left'>&nbsp;&nbsp;&nbsp;其他分类中还有");
      infos.push("个类似问题 >> <span class='span-link' onclick='lookOver()'>点击查看</span></td></tr>");
      infos.push("如果您没有得到满意的解答，可以 <span class='span-link' onclick='getWlist(1)'>给客服人员留言</span> 或 <span class='span-link' onclick='history.go(0)'>在线咨询</span>");
      infos.push("<div style='float:left; margin-top:5px; margin-left:3px;'>>> 您正在咨询有关");
      infos.push("的问题</div><span class='span-link' onclick='sendtext(\"GetTypeList\")' style='float:right; margin-top:5px; margin-right:10px; text-decoration:none'>选择问题分类</span>");
      infos.push("所有分类");
      infos.push("&nbsp;&nbsp;&nbsp;&nbsp;抱歉，该类没有找到与您输入相关的问题");
      infos.push("请填写你的SKYPE！");
      infos.push("请填写你的单位！");
      infos.push("• 客服人员将您转接至自助答疑<br>");
      infos.push("未建立对话，不能发送消息。");
      infos.push("对话已结束，不能发送消息。");
      infos.push("发送内容不能为空，请重新输入。");
      infos.push("智能机器人");
      infos.push("自助答疑");
      infos.push("您好，我是");
      infos.push("提交留言");
      infos.push("继续留言");
      infos.push("结束对话");
      infos.push("留言成功！");
      infos.push("是否继续留言");
      infos.push("链接不能为空！");
      infos.push("建立对话失败，请检查网络环境后重试");
      infos.push("您的消息");
      infos.push("发送失败，请检查网络环境后重试");
      infos.push("文件发送失败，请检查网络环境后重试");
      infos.push("网络连接已修复，您可以继续发送对话");
      infos.push("由于网络原因，提交评分失败");
      infos.push("");
      infos.push("取消");
      infos.push("您已经很长时间没有发送信息了，再过3分钟，系统将会自动断开对话");
      infos.push("请正确填写你的电子信箱！");
      infos.push("请正确填写你的SKYPE！");
      infos.push("您太久没有操作，页面已过期，请在刷新后重新操作！");
      infos.push("请填写你的联系地址！");
      infos.push("对话已接通，");
      infos.push("正在为您服务!");
      infos.push("*如果链接文字为空，则直接显示链接");
      infos.push("确定");
      infos.push("您有新消息..");
      infos.push("系统提示");
      infos.push("建议");
      infos.push("*字数控制在150字以内");
      infos.push("输入字数超过150字，请重新输入！");
      infos.push("无热门问题");
      infos.push("回复方式");
      infos.push("短信");
      infos.push("邮件");
      infos.push("网站");
      infos.push("留言对象");
      infos.push("公司");
      infos.push("部门(人员)");
      infos.push("不能选择未分组");
      infos.push("回复");
      infos.push("客服咨询");
      infos.push("留言回复");
      infos.push("访客防火墙");
      infos.push("验证码");
      infos.push("跳过");
      infos.push("请输入验证码");
      infos.push("验证码错误");
      infos.push("是否接受");
      infos.push("的评分请求？");
      infos.push("如果您没有得到满意的解答，可以 <span class='span-link' onclick='history.go(0)'>在线咨询</span>");
      infos.push("来自手机客服端：<a href='http://www.53kf.com' target='_blank'>http://www.53kf.com</a>");
      infos.push("请输入相关信息");
      infos.push("如果您没有得到满意的解答，可以 <span class='span-link' onclick='getWlist(1,1)'>给客服人员留言</span> 或 <span class='span-link' onclick='history.go(0)'>在线咨询</span>");
      infos.push("很抱歉，由于您长时间未咨询，系统结束了本次服务，请对本次服务评价。若您仍需其他服务，请再次联系客服。");
      infos.push("感谢您的咨询，请您主动评价，您将获得再次咨询时的优先接待服务。");
      infos.push("位客服在线");
      infos.push("图片设置");
      infos.push("请输入网络地址或点击浏览上传");
      infos.push("浏 览");
      infos.push("仅支持JPG、JPEG、GIF、PNG，大小2M以内");
      infos.push("发&nbsp;送");
      infos.push("取&nbsp;消");
      infos.push("文件设置");
      infos.push("请点击浏览上传文件");
      infos.push("文件发送支持常用文档、影音、图片、压缩文件的发送，请控制您的发送文件大小不超过4M。");
      infos.push("未分组");
    var check_num_status = 0; //验证码是否检测通过
  var minchat_style = 1;
  var locate = "cn";
  var lytype = "0";
  var lyurl = "";
  var company_tpl = 'minichat2';
  var enable_talk_collection = "1";  // 通讯采集开关 1:开启 0:关闭
  var host = "www7.53kf.com";
  var master_host = "tb.53kf.com";
	var market_host = "www.53kf.com";
  var commond_version = "123456"; //webClient.js的版本号，上发到服务端

  var copartner = "";
  var username = unescape("");
  var userinfo = unescape("");
  var contact = unescape("");
  var question = unescape("");
  var talkpage = "http://www.bjjfr.com/works/";
  var frompage = "";
  var talktitle = getCookie3("talktitle");
  var land_page = "http://www.bjjfr.com/index.html#1";
  var guest_ip_info = "北京市[电信]";
  var talk_type = 0;//会话类型
  var origin_type = 0;//流失标记
  var origin_time = 0;//流失时间
  var search_engine = "";
  var keyword = "";
  //提示信息
  var prompt137= "请输入验证码";
  var prompt138= "验证码错误";
  //设置相关
  var kfpf = "1";
  var vote_true = false;
  var vote_value = "0";//默认评分
  var vote_bt = infos[71];
  var postkey = 1; //发送消息的热键  1：ENTER 2：CTRL+ENTER
  var cname = "金夫人婚纱摄影";
//var company_id = "70777085";
  var isold = 0;
  var mytempid = "0";
  var myfirst_tempid = "0";
  var conn_prompt = "您好，欢迎您的咨询，请问有什么需要帮助的吗？";
  var m_conn_prompt_list = new Array(); // 所有客服接通提示
          
    var re2 = new Object();
    re2.id6d = "5410858";
	re2.prompt = "";
            re2.carousel = "1";
        re2.carousel_interval = "5";
    	re2.carousel_num = "3";
        re2.carousel_prompt1 = "";
        re2.carousel_prompt2 = "";
        re2.carousel_prompt3 = "";
        re2.carousel_prompt4 = "";
        re2.carousel_prompt5 = "";
        re2.carousel_prompt6 = "";
        re2.carousel_prompt7 = "";
        re2.carousel_prompt8 = "";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412647";
	re2.prompt = "<p><span style=\"color:#ff0000;\">欢迎光临北京金夫人官方网站</span></p><p><span style=\"color:#ff0000;\">中国婚纱影楼客片质量NO.1</span></p><p><span style=\"color:#ff0000;\">&nbsp;</span><span style=\"color:#ff0000;\">百万新人口碑见证</span></p><p><span style=\"color:#ff0000;\">QQ： 2069168739咨询预定：18601649907</span></p><div style=\"top: 0px;\">﻿﻿</div><div style=\"top: 29px;\">﻿﻿</div>";
            re2.carousel = "1";
        re2.carousel_interval = "5";
    	re2.carousel_num = "2";
        re2.carousel_prompt1 = "<strong>&nbsp;欢迎光临</strong><span style=\"font-size:16px;color:#ff0000;\"><strong>金夫人.婚纱摄影官方网站<br /></strong></span>★高<strong><span style=\"color:#000000;\">端韩式婚纱</span></strong>摄影<span style=\"font-size:16px;color:#ff0000;\"><strong>十大杰出影楼<br /></strong></span><br />★<strong><span style=\"font-size:16px;color:#ff0000;\">26年</span>品牌企业，百万客户口碑见证！<br /><br />★全北京最大<span style=\"font-size:16px;color:#ff0000;\">4.4万平米</span>实景摄影基地！<span style=\"font-size:16px;color:#ff0000;\">全场通拍，不分区</span></strong> ";
        re2.carousel_prompt2 = "<p><span style=\"font-size:16px;\"><strong><span style=\"font-size:13px;\">{53b#14#}</span><span style=\"color:#ff0000;\">华北区旗舰店9周年辉煌盛典</span></strong><span style=\"font-size:13px;\"><strong>{53b#14#}<br />1.最高付300元得3000元，只限前9名。<br />2.进店前100名送手持熨烫机一台。<br />3.订单抽大奖100%中奖。<br />4.10000元礼包，订单即送。<br />5.明星战袍0元选拍。<br />6.会员双倍积分。</strong></span></span></p><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt3 = "<p><strong>您好！我是您的VIP网络顾问, 有什么可以帮到您的吗？{53b#14#}</strong></p><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt4 = "<p><strong>亲，您是想拍<span style=\"color:#ff0000;\">婚纱照</span>还是个人<span style=\"color:#ff0000;\">写真</span>呢？？{53b#35#}</strong></p><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt5 = "<div style=\"top: 0px;\">﻿﻿</div><strong>亲，您打算什么时候拍呢？{53b#14#}</strong> ";
        re2.carousel_prompt6 = "<div style=\"top: 0px;\">﻿﻿<span style=\"font-size:13px;\"><strong>亲，您有看过咱家的客片吗？我给您发些最新的客片您看看吧。 </strong></span></div><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt7 = "<div style=\"top: 0px;\">﻿﻿<strong>亲，您方便留下您的QQ或者微信吗？我们这里有最新的客片，外景照片，服装，活动价格 可以发给您看一看。{53b#35#}</strong> </div>";
        re2.carousel_prompt8 = "<div style=\"top: 0px;\"><strong>﻿﻿亲，还在吗？{53b#9#}</strong></div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412649";
	re2.prompt = "<pre style=\"top: 0px;\"><p><span style=\"font-size:18px;color:#ff0000;\">欢迎光临北京金夫人官方网站</span></p></pre><pre style=\"top: 0px;\"><span style=\"font-size:18px;color:#ff0000;\">中国婚纱影楼客片质量NO.1</span></pre><pre style=\"top: 0px;\"><span style=\"font-size:18px;color:#ff0000;\">百万新人口碑见证</span></pre><pre style=\"top: 0px;\"><span style=\"font-size:18px;color:#ff0000;\">企业QQ：1623033375  咨询预定：通通18291912400</span></pre>";
            re2.carousel = "1";
        re2.carousel_interval = "10";
    	re2.carousel_num = "1";
        re2.carousel_prompt1 = "<div><div><span style=\"font-size: 16px;\"><span style=\"color:#3333ff;\"><span style=\"font-size:13px;\"><span style=\"font-family:微软雅黑;color:#000000;\">亲，您是想咨询</span><span style=\"font-family:微软雅黑;\">婚纱照</span><span style=\"font-family:微软雅黑;color:#000000;\">还是写真呢？</span></span></span></span></div></div>";
        re2.carousel_prompt2 = "<div><!--StartFragment --><div><div><!--StartFragment --><div><div><span style=\"font-family:Microsoft YaHei;\"><!--StartFragment --><span style=\"font-size:13px;\"></span></span></div></div><div><!--StartFragment --><div><span style=\"font-family:Microsoft YaHei;font-size:16px;\"><span style=\"font-family:Microsoft YaHei;font-size:13px;\">洪荒女神，助力奥运——中国夺冠你就免单 <br />NO.1 支付一元，升级明星婚纱（火爆中）<br />NO.2 支付199元，冠军套系再减1000（已开启）<br />NO.3 奥运福利大礼10000元（即将开启）<br />NO.4 三场赛事夺冠有礼，共享奥运赛程（期待中）<br />NO.5 体育事业全民共享，1880元答谢礼<br />NO.6 全部免单 费用退还 （期待中）</span></span>﻿﻿</div></div></div></div></div>";
        re2.carousel_prompt3 = "<div><div><!--StartFragment --><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲，您打算什么时候拍呢？快来开启您的洪荒之力吧，婚照爆省10000元呢~</span></div><div>﻿﻿</div></div></div><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt4 = "<div><span style=\"font-family:Arial;font-size:13px;\"></span><div><span style=\"font-family:Microsoft YaHei;font-size:16px;\"></span><div></div></div></div><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><div><div><span style=\"font-family:Arial;\"><!--StartFragment --></span><div><span style=\"font-family:Arial;\"><span style=\"font-size:13px;\"><span style=\"font-family:Microsoft YaHei;\">亲爱的，10月档期已开启，新风格新场景限时报名中，每天开放7组哦~</span><br /></span></span></div><div>﻿﻿﻿﻿﻿</div></div></div></div></div></div></div></div><div style=\"top: 0px;\">﻿﻿</div><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt5 = "<div><span style=\"font-family:Microsoft YaHei;font-size:16px;\"><span style=\"font-size:13px;\"><!--StartFragment --></span></span><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\"><!--StartFragment --></span><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲爱哒，方便加您QQ或微信吗，我把最新照片发给您看看，有喜欢的话，我再给您详情介绍哦！</span>﻿﻿</div></div></div>";
        re2.carousel_prompt6 = "<span style=\"font-size:13px;\"><!--StartFragment --></span><div><span style=\"font-family:Microsoft YaHei;\">亲，<span style=\"color:#cc0000;\">奥运活动</span>力度超大呢，金夫人拍案，中国金牌总数第一，全部免单费用退还哦！</span></div><div>﻿﻿</div><div style=\"top: 0px;\">﻿﻿</div>";
        re2.carousel_prompt7 = "<span style=\"color: rgb(51, 51, 255);\"><span style=\"color: rgb(0, 0, 0);\"><span style=\"font-family:Microsoft YaHei;font-size:13px;\"><span style=\"font-family:Microsoft YaHei;font-size:16px;\"><span style=\"font-size:13px;\">亲，在吗？ 我不是机器人哦,我在等您回复哦！</span></span></span></span></span> ";
        re2.carousel_prompt8 = "<span style=\"color:#000099;\"></span><div><span style=\"font-family:Microsoft YaHei;\"><span style=\"font-size:16px;\"><span style=\"font-size:13px;color:#000000;\">亲&nbsp; 您有什么问题可以随时问我哦！我给您简单的介绍一下，比您自己看更好呢！您也可以加我QQ：&nbsp;&nbsp;657537328{53b#35#}</span>﻿﻿﻿</span></span>﻿﻿</div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412650";
	re2.prompt = "<pre style=\"TOP: 0px\"><div>欢迎光临金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!    QQ：  </div>3176396764</pre>";
            re2.carousel = "1";
        re2.carousel_interval = "10";
    	re2.carousel_num = "1";
        re2.carousel_prompt1 = "<p><span style=\"font-size: 16px; color: rgb(0, 0, 0);\"><span style=\"font-family:Microsoft YaHei;\">亲，您是想咨询<span style=\"color: rgb(255, 0, 0);\">婚纱照</span>还是写真呢？现在网络预约 有<span style=\"color: rgb(255, 0, 0);\">网络特惠</span>活动哦！{53b#22#}</span></span></p>";
        re2.carousel_prompt2 = "<div><div><span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">爱琴海圣地&nbsp;&nbsp; 香榭丽舍庄园<br />金夫人最新独家海景系列&nbsp; 黄金档期仅剩666席 即将售罄</span><br /><span style=\"font-family:微软雅黑;\">一、人气明星套系5999元&nbsp;&nbsp; </span><br /><span style=\"font-family:微软雅黑;\">二、店长推荐套系7999元</span><br /><span style=\"font-family:微软雅黑;\">三、当日支付再送卢浮宫晶钻浮雕摆台</span><br /><span style=\"font-family:微软雅黑;\">四、更有万元大礼包，定制衬衫、加送精修、礼服升级、定制亚伦珠宝、摆台等一站式购齐</span><br /></span></div></div>";
        re2.carousel_prompt3 = "<div><span style=\"font-size:18px;\"><span style=\"font-size:16px;\"><span style=\"font-family:Microsoft YaHei;\"></span></span></span><div><span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">亲，您的婚期确定了吗？{53b#9#}全新海景系列黄金档期开售，等您来抢哦！{53b#18#}</span><br /></span></div><br /><br /></div><p>&nbsp;</p>";
        re2.carousel_prompt4 = "<span style=\"font-family:Microsoft YaHei;font-size:16px;\"></span><div><span style=\"font-family:Microsoft YaHei;\"></span><div><span style=\"font-size:16px;\"><span style=\"font-family:Microsoft YaHei;\"></span></span><div><span style=\"font-family:Microsoft YaHei;\"><span style=\"font-size:16px;\">亲爱哒，金夫人独家海景基地，限量抢定，不出北京就能拍海景啦&nbsp;</span><br /></span></div></div><span style=\"font-family:Microsoft YaHei;\"><br /></span></div><p><span style=\"font-family:Microsoft YaHei;\">&nbsp;</span></p>";
        re2.carousel_prompt5 = "<div><div><span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">亲爱哒，方便加您QQ或微信吗，我把最新海景系列发给您看看，有喜欢的话，我再给您详情介绍哦~</span></span> </div></div>";
        re2.carousel_prompt6 = "<div><div><span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">金夫人全新独家海景系列《暖阳》《夜曲》《 碧波》不要错过呦！</span></span></div></div>";
        re2.carousel_prompt7 = "<span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">亲，在吗？ 我不是机器人哦，在等您回复哦！ 我是客服顾问 胖胖，我在这等着您回复哦，您知道吗？花儿谢了我也会继续等下去的哦{53b#22#}</span></span> ";
        re2.carousel_prompt8 = "<div><span style=\"font-size: 16px;\"><span style=\"font-family:Microsoft YaHei;\">亲&nbsp;您有什么问题可以随时问我哦！我给您简单的介绍一下比您自己看更好呢！您也可以加我QQ:&nbsp;3176396764</span><br /></span></div><p align=\"left\">&nbsp;</p>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412651";
	re2.prompt = "<div><span style=\"font-family:SimSun;font-size:24px;color:#ff0000;\"><!--StartFragment --></span><div><span style=\"font-family:Microsoft YaHei;font-size:18px;color:#ff0000;BACKGROUND-COLOR: rgb(255,255,255)\">欢迎光临金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!<br /></span></div><span style=\"font-family:Microsoft YaHei;font-size:18px;color:#ff0000;BACKGROUND-COLOR: rgb(255,255,255)\">QQ：857227431</span></div>";
            re2.carousel = "1";
        re2.carousel_interval = "10";
    	re2.carousel_num = "1";
        re2.carousel_prompt1 = "<div><p class=\"MsoNormal\"><span style=\"font-family:微软雅黑;FONT-SIZE: 10.5pt\">亲，您是想咨询</span><span style=\"font-family:微软雅黑;color:#ff00;FONT-SIZE: 10.5pt\">婚纱照</span><span style=\"font-family:微软雅黑;FONT-SIZE: 10.5pt\">还是写真呢？</span></p></div>";
        re2.carousel_prompt2 = "<div><div><div><div><div><div><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">洪荒女神，助力奥运——中国夺冠你就免单&nbsp;<br />NO.1&nbsp;支付一元，升级明星婚纱（火爆中）<br />NO.2&nbsp;支付199元，冠军套系再减1000（已开启）<br />NO.3&nbsp;奥运福利大礼10000元（即将开启）<br />NO.4&nbsp;三场赛事夺冠有礼，共享奥运赛程（期待中）<br />NO.5&nbsp;体育事业全民共享，1880元答谢礼<br />NO.6&nbsp;全部免单&nbsp;费用退还&nbsp;（期待中）<br /></span></div></div></div></div></div></div></div>";
        re2.carousel_prompt3 = "<div><div><div><div><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲，您打算什么时候拍呢？快来开启您的洪荒之力吧，婚照爆省10000元呢~<br /></span></div></div></div></div></div>";
        re2.carousel_prompt4 = "<span style=\"font-family:Microsoft YaHei;\"><!--StartFragment --></span><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><!--StartFragment --><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲爱的，10月档期已开启，新风格新场景限时报名中，每天开放7组哦~<br /></span></div></div></div></div></div>";
        re2.carousel_prompt5 = "<div><div><div><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲爱哒，方便加您QQ或微信吗，我把最新照片发给您看看，有喜欢的话，我再给您详情介绍哦~<br /></span></div></div></div></div>";
        re2.carousel_prompt6 = "<div><div><div><div><div><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲，奥运活动力度超大呢，金夫人拍案，中国金牌总数第一，全部免单费用退还哦！<br /></span></div></div></div></div></div></div>";
        re2.carousel_prompt7 = "<span style=\"FONT-SIZE: 10.5pt\"><!--StartFragment --></span><div><span style=\"font-size:13px;\"><!--StartFragment --></span><div><!--StartFragment --><div><span style=\"font-family:Microsoft YaHei;\"><span style=\"font-size:13px;\">&nbsp;亲，在吗？&nbsp;我不是机器人哦。</span></span></div></div></div>";
        re2.carousel_prompt8 = "<span style=\"font-family:微软雅黑;color:#ff00;FONT-SIZE: 12pt\"></span><span style=\"font-family:微软雅黑;color:#ff00;FONT-SIZE: 12pt\"><!--StartFragment --></span><div><span style=\"font-size:13px;\"><span style=\"font-family:Microsoft YaHei;color:#000000;\">亲&nbsp; 您有什么问题可以随时问我哦！我给您简单的介绍一下，比您自己看更好呢！您也可以加我QQ： &nbsp;857227431{53b#35#}</span><br /></span></div><p style=\"TEXT-ALIGN: left\" class=\"MsoNormal\">﻿﻿﻿</p><div style=\"TOP: 0px\">﻿﻿</div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412652";
	re2.prompt = "<div><p><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">欢迎光临北京金夫人官方网站</span><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">&nbsp;</span></p><p><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">中国婚纱影楼客片质量NO.1</span></p><p><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">&nbsp;</span><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">百万新人口碑见证</span></p><p><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">企业QQ：<span style=\"color:#ff0000;\">613883131</span>&nbsp;</span></p><p><span style=\"color:#ff0000;BACKGROUND-COLOR: #ffffff\">咨询电话：13436680868</span></p></div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5413715";
	re2.prompt = "<div><span style=\"font-family:SimSun;font-size:24px;color:#ff0000;\"><!--StartFragment --></span><div><span style=\"font-family:Microsoft YaHei;font-size:18px;color:#ff0000;background-color: rgb(255, 255, 255);\">欢迎光临北京金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!<br /></span></div><span style=\"font-family:Microsoft YaHei;font-size:18px;color:#ff0000;background-color: rgb(255, 255, 255);\">QQ：287642808</span></div><div><span style=\"font-family:Microsoft YaHei;\"><span style=\"font-size:18px;\"><span style=\"color:#ff0000;background-color: rgb(255, 255, 255);\">咨询预定：18101096370</span></span></span>﻿﻿</div><div style=\"top: 0px;\">﻿﻿</div><div style=\"top: 100px;\">﻿﻿</div><div style=\"top: 92px;\">﻿﻿</div><div style=\"top: 124px;\">﻿﻿</div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10056557";
	re2.prompt = "<p><span style=\"font-size:18px;color:#ff0000;BACKGROUND-COLOR: rgb(255,255,255)\"><strong>欢迎光临金夫人官方网站</strong></span></p><p><span style=\"font-size:16px;color:#ff0000;BACKGROUND-COLOR: rgb(255,255,255)\">中国婚纱影楼客片质量NO.1</span></p><p><span style=\"font-size:16px;color:#ff0000;BACKGROUND-COLOR: rgb(255,255,255)\">百万新人口碑见证</span></p><p><span style=\"font-size:16px;color:#ff0000;\"></span>&nbsp;</p>";
            re2.carousel = "1";
        re2.carousel_interval = "5";
    	re2.carousel_num = "2";
        re2.carousel_prompt1 = "<div style=\"TOP: 0px\"><span style=\"font-family: ;font-size:16px;color:black;BACKGROUND: white\">欢迎光临金夫人.唯映像婚纱摄影官方网站<br />★高端韩式婚纱摄影十大杰出影楼<br />★26年品牌企业，百万客户口碑见证！<br />★4.4万平米实景摄影基地！全场通拍，不分区</span></div><span style=\"font-family:宋体;\"></span>";
        re2.carousel_prompt2 = "<!--StartFragment --><div><span style=\"font-size:16px;\">我是V.club人气女王  2015.8.8<br />生日派对【100对情侣新作体验试拍会】<br />报名流程：1.在线报名留下您的姓名和电话<br />2.抽取100对新人参与试拍体验<br />3.V.club总监团队全程1对1服务，免费拍摄婚照1组<br />4.唯幕微电影中心现场拍摄幸福实录1组<br />5.刻录影像档光盘赠送<br />现场评选V.club人气女王赠送价值3880极品水晶婚纱1件</span></div>";
        re2.carousel_prompt3 = "<p><strong><span style=\"font-family:宋体;font-size:16px;mso-font-kerning: 1.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial; mso-bidi-font-size: 10.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA\">您好！我是您的VIP网络顾问, 有什么可以帮到您的吗？</span></strong></p>";
        re2.carousel_prompt4 = "<p><span style=\"font-family:宋体;\"></span><strong><span style=\"font-family:SimHei;font-size:16px;color:#ff0000;mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial\">亲，您打算拍婚纱照还是个人写真呢？{53b#14#}</span></strong></p>";
        re2.carousel_prompt5 = "<span style=\"font-size:16px;\">&nbsp;亲，您打算什么时候拍呢？</span> ";
        re2.carousel_prompt6 = "<span style=\"font-size:16px;color:#33ff33;\">&nbsp;<span style=\"color:#000000;\">亲，我们正在进行大型特惠活动，您方便说下您的QQ或者是微信吗？ 给您发下我们现在的活动内容，套系及最新照片风格!您了解下</span></span> ";
        re2.carousel_prompt7 = "<span style=\"color:#ff0000;\"> <span style=\"font-size:16px;\">亲，在吗？{53b#14#}</span></span> ";
        re2.carousel_prompt8 = " 亲 您是咨询婚纱还是写真呢？ ";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10066923";
	re2.prompt = "您好，欢迎您的咨询，请问有什么需要帮助的吗？ ";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10066953";
	re2.prompt = "<div><span style=\"font-family:SimSun;font-size:24px;\"><!--StartFragment --></span><div><span style=\"color:#ff6600;\"></span></div></div><h2 align=\"left\"><div><span style=\"color:#ff6666;\">欢迎光临金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!<br /><br />QQ：3219794641</span></div></h2>";
            re2.carousel = "1";
        re2.carousel_interval = "10";
    	re2.carousel_num = "1";
        re2.carousel_prompt1 = "<div><span style=\"FONT-SIZE: 10.5pt; FONT-FAMILY: \" sans-serif=\"\" en-us=\"\" zh-cn=\"\" ar-sa=\"\"><span style=\"mso-bidi-font-weight: bold\"><span style=\"color:#000000;\"><span lang=\"EN-US\"></span></span></span></span><p><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲，您是想咨询<span style=\"color:#ff0000;\">婚纱照</span>还是写真呢？！{53b#14#}</span></p></div>";
        re2.carousel_prompt2 = "<span style=\"font-family:Microsoft YaHei;font-size:13px;\"></span><div><div></div><div><span style=\"font-family:Microsoft YaHei;\"></span></div><div><span style=\"font-family:Microsoft YaHei;\">洪荒女神，助力奥运——中国夺冠你就免单&nbsp;<br />NO.1 支付一元，升级明星婚纱（火爆中）<br />NO.2 支付199元，冠军套系再减1000（已开启）<br />NO.3 奥运福利大礼10000元（即将开启）<br />NO.4 三场赛事夺冠有礼，共享奥运赛程（期待中）<br />NO.5 体育事业全民共享，1880元答谢礼<br />NO.6 全部免单 费用退还 （期待中）<br /><span style=\"color: rgb(255, 0, 0);\">以上优惠详情网络客人专享!</span></span></div></div>";
        re2.carousel_prompt3 = "<span style=\"font-family:Microsoft YaHei;\"></span><div><span style=\"font-size: 13px;\"><span style=\"font-family:Microsoft YaHei;\">亲，您打算什么时候拍呢？快来开启您的洪荒之力吧，婚照爆省10000元呢~</span></span></div>";
        re2.carousel_prompt4 = "<span style=\"font-size: 13px;\"><span lang=\"EN-US\"><o:p><span style=\"font-family:Microsoft YaHei;\"></span><div></div><div><div><div><div><span style=\"font-family:Microsoft YaHei;\">&nbsp;亲爱的，10月档期已开启，新风格新场景限时报名中，每天开放7组哦~<br /></span></div><br /></div></div></div></o:p></span></span>";
        re2.carousel_prompt5 = "<p><span style=\"font-family:Microsoft YaHei;font-size:13px;\"></span></p><div><span style=\"font-family:Microsoft YaHei;\">&nbsp;亲爱哒，方便加您QQ或微信吗，我把最新照片发给您看看，有喜欢的话，我再给您详情介绍哦~{53b#28#}</span></div><p></p>";
        re2.carousel_prompt6 = "<div><span style=\"font-family:Microsoft YaHei;\"></span><div><div><span style=\"font-family:Microsoft YaHei;\">亲，奥运活动力度超大呢，金夫人拍案，中国金牌总数第一，全部免单费用退还哦！</span><br /></div></div></div> ";
        re2.carousel_prompt7 = "<div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲，在吗？ 我不是机器人哦，我在等你回复哦~{53b#15#}</span></div>";
        re2.carousel_prompt8 = "<strong><span style=\"font-family:Microsoft YaHei;color:#cc0000;\"></span></strong><div><span style=\"font-family:Microsoft YaHei;\"></span><div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">亲&nbsp;您有什么问题可以随时问我哦！我给您简单的介绍一下比您自己看更好呢！您也可以加我QQ:2336887128</span></div><span style=\"font-family:Microsoft YaHei;font-size:13px;\">{53b#21#}</span></div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10068919";
	re2.prompt = "<span style=\"color: rgb(255, 0, 0);\"><span style=\"font-size:18px;\"><span style=\"font-family: ;\"><span style=\"font-family:宋体;\"><!--StartFragment --></span></span></span></span><div>欢迎光临北京金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!<br /></div><p align=\"left\" style=\"margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none;\"><span style=\"color: rgb(255, 0, 0);\"><strong><span style=\"font-size:18px;\"><span style=\"font-family: ;\"><span style=\"font-family:宋体;\">QQ:2690173806</span></span></span></strong></span></p><span style=\"font-family:宋体;color:#ff0000;\"></span><p align=\"left\" style=\"margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none;\"><span style=\"color:#ff0000;\"><strong><span style=\"font-family:华文宋体;font-size:18px;mso-hansi-font-family: Times-Roman; mso-bidi-font-family: 华文宋体; mso-font-kerning: 0pt;\">咨询预定：13439888775</span></strong></span></p><span style=\"color:#ff0000;\"></span><div style=\"top: 0px;\">﻿﻿</div><div style=\"top: 161px;\">﻿﻿</div><div style=\"top: 0px;\">﻿﻿</div><div style=\"top: 34px;\">﻿﻿</div>";
        m_conn_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10086947";
	re2.prompt = "<div>欢迎光临金夫人官方网站!中国婚纱影楼客片质量NO.1!百万新人口碑见证企业!<br /><br />QQ：2336887128</div>";
        m_conn_prompt_list.push(re2);
    var busy_prompt = "对不起，线路繁忙，请稍候，您也可以给我们留言！";
  var close_prompt = "感谢您的咨询！谢谢，再见！";
  var m_close_prompt_list = new Array(); // 所有客服结束提示
          
    var re2 = new Object();
    re2.id6d = "5412649";
    re2.prompt = "";
    m_close_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412650";
    re2.prompt = "";
    m_close_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412651";
    re2.prompt = "";
    m_close_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10066953";
    re2.prompt = "";
    m_close_prompt_list.push(re2);
    var lword_prompt = "您好，现在客服不在线，请留言。如果没有留下您的联系方式，客服将无法和您联系！";
  var reject_prompt = "无法连接客服，您已被阻止！";
  var close_bro_prompt = "您即将离开咨询页面，离开后不能继续与客服人员沟通，您确定离开吗？点击确定离开，点击取消继续与客服人员沟通";
  var zdkf_auto = "off";
  var worker_id = "gl-002,gl-004,gl-009,gl-001,gl-007,gl-003,237084399@qq.com";
      var wids = "gl-002,gl-004,gl-009,gl-001,gl-007,gl-003,237084399@qq.com";
    var worker_name = "";
  var zdyly_ck = "";
  var online_cnt = "1";
  var is_wlist = "0";
  var reg_stat = "2"; //reg_stat=0; // 调试用

  var disp = "";
  var stat = "";
  var arg = "9005190";
  var style = "1";
  var style_id = "103723820";
  var verify_key = "";
  
  var is_fav = "1";  // 是否弹出IE收藏夹
  var zsk = "1";
  var flashad = "0"; // flash广告功能
  var service = "53kf";

  var m_zsk_all = new Array();                    // 所有机器人信息
  
  var m_robid = "";                // 机器人id
  var zsk_prompt = "";           // 机器人问候语
  var zsk_name = "";               // 机器人昵称
  var zsk_auto_login = "";   // 机器人自动上线
  var zsk_state = "";             // 机器人状态
  var zsk_auto_hidden = ""; // 机器人客服在线时隐身
  var zsk_robot_ly = "";       // 机器人留言链接
	var zsk_zsktb_url = "";     // 机器人头像
  var zsk_un_prompt = "";//机器人不明白的回答

  var m_typeId = 0;                               // 机器人问题类别
  var m_oquesArray = new Array();                 // 保存其他类别问题
  var m_typeArray = new Array();                  // 保存类别

  var reg_prompt = "您好，欢迎您的咨询，请按提示输入您的信息，然后点击开始对话。"; // 注册提示语
  var rwordstr = '<tr><td align="right">姓名:</td><td align="left"><input id="reg_name" name="reg_name" type="text" maxlength="100" size="30"/></td></tr><tr><td align="right">E-mail:</td><td align="left"><input id="reg_email" name="reg_email" type="text" maxlength="100" size="30"/></td></tr><tr><td align="right">电话:</td><td align="left"><input id="reg_phone" name="reg_phone" type="text" maxlength="100" size="30"/></td></tr><tr><td align="right">QQ:</td><td align="left"><input id="reg_qq" name="reg_qq" type="text" maxlength="100" size="30"/></td></tr>'; // 注册填写项目
  var zdyzc_checked = '0';//自定义注册字段选中的个数
  var zdyzc_arr = [];//自定义注册字段选中的个数
  var ly_first = true; // 首次留言
  var contact_first = true; // 首次联系方式
  var reg_c = 'name,email,phone,qq'; // 注册配置项目

  //留言界面
  var lwordstr_reg = '          <tr id =name>            <td align="right" valign="middle" class="leaveword_left_td">姓名:</td>            <td align="left" valign="middle"><input id="ly_name" name="ly_name" type="text" class="leaveword_input"/></td>          </tr>          <tr id =email>            <td align="right" valign="middle" class="leaveword_left_td">E-mail:</td>            <td align="left" valign="middle"><input id="ly_email" name="ly_email" type="text" class="leaveword_input"/></td>          </tr>          <tr id =phone>            <td align="right" valign="middle" class="leaveword_left_td">电话:</td>            <td align="left" valign="middle"><input id="ly_phone" name="ly_phone" type="text" class="leaveword_input"/></td>          </tr>						<tr id="phone_hint">							<td align="right" valign="middle" class="leaveword_left_td">&nbsp;</td>							<td align="left" valign="middle"><font color="red">*电话输入框也可以填写手机(供短信回复用)</font></td>						</tr>          <tr id =qq>            <td align="right" valign="middle" class="leaveword_left_td">QQ:</td>            <td align="left" valign="middle"><input id="ly_qq" name="ly_qq" type="text" class="leaveword_input"/></td>          </tr>'; // 留言注册项
  var lwordstr_ly = '    <tr id="lwordstr_ly">      <td align="right" valign="top" class="leaveword_left_td"><font color="red">*</font>留言内容:</td>      <td align="left" valign="middle"><textarea id="ly_content" name="ly_content" class="leaveword_textarea"></textarea></td>    </tr>';  // 留言内容项
  var is_ly_custom = ''; //留言定制版
  var ly_captcha = '';//留言验证码是否开启

  if(is_ly_custom == 1){
    var lwordstr_submit = '<tr class="ly_sub" height="36"><td ><input id="reset_sub" class="reset" onclick="formReset()" type="button" value="重置"/></td><td align="rig" valign="middle"><div class="lw_sb_div" id="lw_sb_div" style="float:left;width:85px;"><input id="lw_sb" name="lw_sb" onclick="try{save_lword(\''+reg_c+'\')}catch(e){}" type="button" value="'+infos[94]+'" style="cursor:pointer;height:24px;"/></div>'+"<div style='margin-top:2px;'></div>"+'</td></tr><tr height="36"><td align="right" valign="top" class="leaveword_left_td"></td></tr>'; // 留言提交项
  }else if(ly_captcha == 2){
    var lwordstr_submit = '<tr class="ly_sub" height="36"><td align="right" valign="top" class="leaveword_left_td"></td><td align="left" valign="middle"><div style="float:left;width:85px;"><input id="lw_sb" name="lw_sb" onclick="try{save_lword(\''+reg_c+'\')}catch(e){}" type="button" value="'+infos[94]+'" style="cursor:pointer;height:24px;"/></div>'+"<div style='margin-top:2px;'></div>"+'</td></tr><tr height="36"><td align="right" valign="top" class="leaveword_left_td"></td>'; // 留言提交项
  }else{
      var lwordstr_submit = '<tr><td align="right" valign="middle" class="leaveword_left_td"><font color="red">*</font>验证码:</td><td class="leaveword_left_td" align="left" valign="middle"><input onfocus="return_check_status()" maxlength="4" style="width:50px" type="text" class="leaveword_input" name="ly_check_num" id="ly_check_num" />&nbsp;<img id="is_ok" src="" style="position: relative; top: 4px; display: none;margin-right:5px;" /><img id="refresh_img"  src="img/refresh_img.png" style="position: relative; top: 5px; width: 20px; cursor: pointer;" /></td></tr><tr class="ly_sub" height="36"><td align="right" valign="top" class="leaveword_left_td"></td><td align="left" valign="middle"><div style="float:left;width:85px;"><input id="lw_sb" name="lw_sb" onclick="try{save_lword(\''+reg_c+'\')}catch(e){}" type="button" value="'+infos[94]+'" style="cursor:pointer;height:24px;"/></div>'+"<div style='margin-top:2px;'></div>"+'</td></tr><tr height="36"><td align="right" valign="top" class="leaveword_left_td"></td><td align="left" valign="middle"><img title="换一张" onclick="replace_check_num();" id="check_img" style="position:relative; cursor: pointer; width: 135px; height: 55px; visibility: hidden;" src="include/ImgCode.php?'+parseInt(10000*Math.random())+'" /></td></tr>'; // 留言提交项
  }

  var ly_mode_column = 'web,email,sms'; // 留言回复栏目
  var ly_object_column = 'company,department'; // 留言对象栏目

	var m_replyMode = '3'; // 留言回复方式
	var lword_replymMode = '<tr><td align="right" valign="middle" class="leaveword_left_td">回复方式:</td><td align="left" valign="middle"><input type="radio" value="3" checked name="ly_mode" onclick="m_replyMode=3;" />网站&nbsp;&nbsp;<input type="radio" value="2" name="ly_mode" onclick="m_replyMode=2;" />邮件&nbsp;&nbsp;<input type="radio" value="1" name="ly_mode" onclick="m_replyMode=1;" />短信</td></tr>'; // 留言回复方式项

	var m_lwordObject = '0'; // 留言对象
	var lword_object = '<tr><td align="right" valign="middle" class="leaveword_left_td">留言对象:</td><td align="left" valign="middle"><select id="object_select" name="object_select" style="width:166px;" onchange="set_ly_obj(this.value)"><option value="zdgs">公司</option></select></td></tr>'; // 留言对象项
        var ly_assign_type = '1';
        var ly_assign_obj = 'zdgs';
        var ly_assign_value = '';
	
  var zdkf_type = '1';
  var m_cardImport = -1; // 名片是否导入
  var m_lyszc = 'on'; // 留言时注册
  var m_regStat = '2'; // 对话前注册

  var is_zdkf = '1'; // 指定客服功能是否开通
  var kf_status = '1'; //是否显示客服繁忙程度

  var brief = "http://www7.53kf.com/iframe_brief.php?style_id=103723820&language=cn"; // 公司简介接口
  var logo = "http://www7.53kf.com/iframe_logo.php?arg=9005190&style_id=103723820&is_zdylogo=1&company_id=70777085&key=1&ykey=1"; // logo接口

  var ly_isImportTimer = 0; // 留言时检测是否导入定时器
  var ly_isImportTryNum = 0; // 留言时检测是否导入计数

  var dbgg = "www7.53kf.com/zdy_dbgg2.php?style_id=103723820&company_id=70777085&dbgg_type=2";  // 底部广告url
  var dbgg_from = "1";  // 底部广告来源
  var company_title = "网页对话";
  var title_power = "1";

  var auto_disconnect = "10";  // 系统自动断开时间
	var disconnect_prompt = "抱歉，由于您长时间未在线，客服暂时断开与您的联系，期待您再次光临金夫人婚纱摄影！";  // 系统自动断开自定义提示
  var lnk_param = "W%C7%96l"; // lnk参数
  var kf_expand = "1"; // 是否展开
  var fav_addr = "http://www.bjjfr.com"; // 收藏夹地址

  var kf_auto_tip = "0"; // 客服无响应提示
  var kf_auto_tip_phrase = "不好意思，客服现在正忙，请稍等……"; // 客服无响应提示语
  var m_phrase_prompt_list = new Array(); // 所有客服无响应提示语
          
    var re2 = new Object();
    re2.id6d = "5412649";
    re2.prompt = "";
    m_phrase_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412650";
    re2.prompt = "";
    m_phrase_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "5412651";
    re2.prompt = "";
    m_phrase_prompt_list.push(re2);
          
    var re2 = new Object();
    re2.id6d = "10066953";
    re2.prompt = "";
    m_phrase_prompt_list.push(re2);
    var imkf_no_talk_time = "600"; // IM客服无响应时间(s)

  var refreshkey = "1"; // 屏蔽F5
	var shieldrkey = "1"; // 屏蔽右键

	var tfrom = "2"; // 1:图标 2:邀请框 3:固定链接 6:新版访客端
	
	var chatrobot = 1;// 1:更新统计表 2:更新成功了 3:不用更新统计表

	var company_tpl_color = "green";// 访客端颜色

	var talk_his_table = "talk_his_d4";// talk_his切表用
	var message_table = "message_d4";// message切表用
  
  var hz6d_last_kf_online = "1";// 上次接待客服是否在线
  var hz6d_last_link_all = "0";// 上次接待客服是否占线

  var company_activity = "<p><img src=\"../upload/xheditor/9005190/103723820/style_activity/201608162024352612.jpg\" alt=\"\" /><br /></p><p><span style=\"font-family:Microsoft YaHei;\">欢迎光临金夫人婚纱摄影官方旗舰店</span></p>";// 活动公告

  var m_worker_intro_all = new Array();// 所有工号个人说明
  
  var firewall = "0";// 访客防火墙
	var firewall_uuid = "48ec8c7d6ecc743b3cc5275f0f1293c7";// 访客防火墙 uuid 作为页面识别
  var firewall_image_times = "3";// 访客防火墙 uuid 作为页面识别
  
  var verify_code = "0";// 访客验证码
  var resizable = "0";// 访客端最大化
  var fk_sound = "1";// 访客端音效
  var lnkopentime = "1472697964";// 访客端打开时间
	var kf_card = "1";//客服名片
	var kf_card_column = "bname,phone,mobile,email,qq";//客服名片选项
  var is_powerby = "Y";//版权信息是否显示
  var ucust_id = ""; //客户网站会员ID
  var u_stat_id = '';
}catch(e){}

function getWlist(type)
{
  var wlist = "";
  if(type==0 || type==1)
  {
    display_status(infos[5]);

    g_comm.QuitWait();
    g_comm.ShutDown(true);  // 断开GET连接
    if(typeof(arguments[1]) != "undefined") {//代表转接给机器人
        if(typeof(ret.tempid)!="undefined") {
            mytempid = ret.tempid;
        }
        $.ajax({
            type: "POST",
            url: "sendmsg.jsp",
            data: "cmd=SRBT&sid="+myid+"&did="+mytempid+"&companyId="+company_id+"&time="+getTime(),
            success: function(msg){
                ret.tempid = parseInt(msg);  
            }
        });
    }
    lnkover = 6;
    set_ly_items();
  }
  else if(type==2)
  {
    var hasonline = 0;
    wlist += UBBCode(UBBEncode("欢迎光临！<br>如果您对我们的产品或者服务有任何意见或者建议，都可以随时与我们线上取得联系，我们的客服人员会给您详尽细致的解答。<br>请选择以下客服人员开始对话："))+"<br><table width='90%' cellpadding='0' cellspacing='0'><tr>";
    var w_k = 0;
    var dept_man_show = "1";
    var dept_over = false;

          if(dept_man_show=="1")  // 指定人员+显示部门
      {
              }
      else  // 指定人员+隐藏部门
      {
              }
    
    wlist += "</tr></table>";

    if(zsk=="1")
    {
      if(m_robid!="")
      {
        if(zsk_auto_login=="0")
        {
          if(zsk_auto_hidden=="0")
          {
            wlist += "<table cellpadding='0' cellspacing='0' border='0'>";
            wlist += "<tr><td colspan='2' align='left'><b>"+infos[91]+"</b></td></tr><tr><td>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='showzsk()'><b>"+zsk_name+" ("+infos[92]+")</b></span></td>";
            wlist += "</tr></table>";
          }
        }
        else
        {
          if(zsk_state=="1")
          {
            if(zsk_auto_hidden=="0")
            {
              wlist += "<table cellpadding='0' cellspacing='0' border='0'>";
              wlist += "<tr><td colspan='2' align='left'><b>"+infos[91]+"</b></td></tr><tr><td>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='showzsk()'><b>"+zsk_name+" ("+infos[92]+")</b></span></td>";
              wlist += "</tr></table>";
            }
          }
        }
      }
    }
  }
	
	return wlist;
}

function expandStaff(id)
{
  if(document.getElementById("group_"+id).style.display=="none")
  {
    document.getElementById("group_"+id).style.display = "block";
    document.getElementById("plus_"+id).innerHTML = "<img src='img/close.gif' />";
  }
  else
  {
    document.getElementById("group_"+id).style.display = "none";
    document.getElementById("plus_"+id).innerHTML = "<img src='img/open.gif' />";
  }
}

// 获取留言项
function set_ly_items()
{
  if(m_lyszc=="on")
  {
    if(isold==0)
    {
      m_cardImport = 0;
      ly_items_table(m_cardImport);
    }
    else
    {
      m_cardImport = document.getElementById("kh_has_import").value;
      if(m_cardImport!=-1)
      {
        ly_items_table(m_cardImport);
      }
      else
      {
        ly_isImportTimer = setInterval("ly_checkIsImport()", 500);
      }
    }
  }
  else
  {
    m_cardImport = 1;
    ly_items_table(m_cardImport);
  }
}

// 留言时检测is_import_true()返回
function ly_checkIsImport()
{
  m_cardImport = document.getElementById("kh_has_import").value;
  if(m_cardImport!=-1)
  {
    clearInterval(ly_isImportTimer);
    ly_items_table(m_cardImport);
  }
  else
  {
    if(ly_isImportTryNum>=CONST_REG_OVERTIME)
    {
      clearInterval(ly_isImportTimer);
      insertErrorInfos("2", "rpc", "is_import_true request failed!");
      m_cardImport = 0;
      ly_items_table(m_cardImport);
    }
    ly_isImportTryNum++;
  }
}

// 留言项字符串
function ly_items_table(isreg)
{
  try
  {
		document.getElementById("ly_items").innerHTML = UBBCode(UBBEncode(lword_prompt));
		document.getElementById("ly_items").innerHTML += "<table border='0' cellpadding='0' cellspacing='0' class='leaveword_tb'>"+lword_replymMode + lword_object + lwordstr_reg + lwordstr_ly + lwordstr_submit+"</table>";
    showImgCode();
    if(ly_mode_column!=""){// 默认选中第一项
      var objs = document.getElementsByName("ly_mode");
      objs[0].checked = true;
    }

        if (m_lyszc != "on") {// 留言时注册没有开启时，默认是回复方式的第一个
            var objs = document.getElementsByName("ly_mode");
            for (var i = 0; i < objs.length; i++) {
                objs[i].disabled = true;
            }
        }
        get_ly_objs();

		if(isreg==1 && m_lyszc=="on"){
			get_user_card();
		}else{
			set_ly_items_value(m_regName, m_regEmail, m_regPhone, m_regQQ, m_regMSN, m_regCompany, m_regAddr);
		}

    // 滚动条置顶
    document.getElementById("box-main-l-disp").scrollTop += -10000;
    setTimeout("set_ly_focus()", 1);
    document.getElementById("res_leaveword").style.display = "none";
    document.getElementById("part_leaveword").style.display = "block";

        if (origin_type != '1') {
            talk_type = 3;
            sendkafka('type', '1', '1');
            origin_type = 1;
        }
    }
    catch (e) {
    }
}

function get_ly_objs(){
    if(ly_assign_obj == 'zdgs'){
        m_lwordObject = 'zdgs';
        return;
    }
    $.ajax({
        type:'POST',
        url:'impl/rpc_ly_object.php',
        data:{check_id:'11917718fe939f3106d35a30074bcd30',company_id:company_id,lang:locate,style_id:'103723820',ly_assign_type:ly_assign_type,ly_assign_obj:ly_assign_obj,ly_assign_value:ly_assign_value},
        dataType:'JSON',
        success:function(data){
            setObjectSelectOption(data);
        }
    })
}

// 设置留言项的值
function set_ly_items_value(name, email, phone, qq, msn, company, addr)
{
	if(reg_c.indexOf("name")>-1)
	{
		if(name.length>0){
			$('#ly_name').parent().parent().css('display','none');
		}
		try{document.getElementById("ly_name").value = name;}catch(e){}
	}
	if(reg_c.indexOf("email")>-1)
	{
		try{document.getElementById("ly_email").value = email;}catch(e){}
	}
	if(reg_c.indexOf("phone")>-1)
	{
		try{document.getElementById("ly_phone").value = phone;}catch(e){}
	}
	if(reg_c.indexOf("qq")>-1)
	{
		try{document.getElementById("ly_qq").value = qq;}catch(e){}
	}
	if(reg_c.indexOf("msn")>-1)
	{
		try{document.getElementById("ly_msn").value = msn;}catch(e){}
	}
	if(reg_c.indexOf("company")>-1)
	{
		try{document.getElementById("ly_company").value = company;}catch(e){}
	}
	if(reg_c.indexOf("addr")>-1)
	{
		try{document.getElementById("ly_addr").value = addr;}catch(e){}
	}
}

// 设置留言焦点
function set_ly_focus()
{
  if(reg_c!="" && m_cardImport==0)
  {
    var arr = reg_c.split(",");
    try
    {
      document.getElementById("ly_"+arr[0]).focus();
    }
    catch(e)
    {
      document.getElementById("ly_content").focus();
    } 
  }
  else
  {
    try
    {
      document.getElementById("ly_content").focus();
    }catch(e){}
  }
}

// 客服状态
function kfState(max_link, cnt)
{
  var state = "";

  if(max_link!=cnt)
  {
    if(kf_status==2)
		{
		  state = infos[31];
		}
		else
		{
		  
            state = infos[61];
            /*
			if(cnt == 0)
			{
				state = infos[60];
			}
			else if((cnt > 0) && (cnt < Math.ceil(max_link/2)))
			{
				state = infos[61];
			}
			else if(cnt >= Math.ceil(max_link/2))
			{
				state = infos[62];
			}
			else{}
            */
		}
  }
  else
  {
    //state = "<font color='red'>"+infos[63]+"</font>";
    state = infos[31];
  }

  return state;
}

function to_rec()
{
  document.getElementById("input1").focus();
  if (locate=="cn")
  {
    document.getElementById("input1").value="请在此发送留言！";
  }
  else if (locate=="ko")
  {
    document.getElementById("input1").value="여기서 메시지를 전송해 주세요.";
  }
  else if (locate=="en")
  {
    document.getElementById("input1").value="Please send message here!";
  }
  else if (locate=="tw")
  {
    document.getElementById("input1").value="請在此發送留言！";
  }
  document.getElementById("input1").select();
}

// 打开自助答疑页面
function openzsk()
{
  window.open("faq.php?company_id=70777085&style_id=103723820");
}

// 机器人问答
function sendtext(cmd, type_id, question_id, wd)
{
  try
  {
    if(cmd=="GetHotList")
    {
      m_typeId = type_id;
      display_tool(getTypeName(type_id));
    }

    var senddata = "cmd="+cmd+"&company_id="+company_id+"&robot_id="+m_robid+"&type_id="+type_id+"&question_id="+question_id+"&wd="+wd; 
    var url = "impl/zsk.php";
    xmlhttp.open("POST", url, false);
 //   xmlhttp.setRequestHeader("Content-Length", senddata.length);
    xmlhttp.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
    xmlhttp.send(senddata);

    var dom = xmlhttp.responseXML;
    var rspNodes = XMLGetNodes(dom, "Response");
    var rspNode = XMLGetNode(rspNodes,0);
    
    //alert(xmlhttp.responseText);

    if(rspNode!=null)
    {
      var ecode = XMLGetNamedAttr(rspNode,"ecode");
      var cmd = XMLGetNamedAttr(rspNode,"cmd");
    }
    else
    {
      return;
    }

    if(ecode==0)
    {
      switch(cmd)
      {
        case "GetTypeList": // 获取问题分类
          var typeArray = new Array();

          var datas = XMLGetNodes(rspNode,"Data");
          var data = XMLGetNode(datas,0);

          var rowList = XMLGetNodes(data,"row");
          var nodeLength=XMLGetNodesLength(rowList);

          for(var i=0;i<nodeLength;i++)
          {
            var node=XMLGetNode(rowList,i);
            var type = new Object();

            type.id = XMLGetNamedAttr(node,"id");
            type.name = XMLGetNamedAttr(node,"name");
            
            typeArray.push(type);
          }
          showTypeList(typeArray);
          break;
        case "GetQuestionList": // 获取问题列表
          var quesArray = new Array();
          var oquesArray = new Array();

          var datas = XMLGetNodes(rspNode,"Data");
          var data = XMLGetNode(datas,0);

          var rowList = XMLGetNodes(data,"row");
          var nodeLength=XMLGetNodesLength(rowList);
          
          for(var i=0;i<nodeLength;i++)
          {
            var node=XMLGetNode(rowList,i);
            var ques = new Object();

            ques.id = XMLGetNamedAttr(node,"id");
            ques.question = XMLGetNamedAttr(node,"question");
            
            quesArray.push(ques);
          }

          var othertypes = XMLGetNodes(rspNode,"OtherType");
          var othertype = XMLGetNode(othertypes,0);

          var rowList = XMLGetNodes(othertype,"row");
          var nodeLength=XMLGetNodesLength(rowList);
          
          for(var i=0;i<nodeLength;i++)
          {
            var node=XMLGetNode(rowList,i);
            var ques = new Object();
              
            ques.id = XMLGetNamedAttr(node,"id");
            ques.question = XMLGetNamedAttr(node,"question");
            
            oquesArray.push(ques);
          }
          
          showQuestionList(quesArray, oquesArray);
          break;
        case "GetAnswer": // 获取问题内容
          var answer = XMLGetNamedAttr(rspNode,"answer");
          var msg = "<div class='send-msg-name'>"+zsk_name+"&nbsp;"+infos[8]+"</div><p class='recv-msg-content'>"+UBBCode(UBBEncode(answer.replace(/(\n)/g,"<br>")))+"</p>";
          display_msg2(msg);
					//更改成机器人咨询
					if(chatrobot==1) chatRobot();
          break;
        case "GetHotList": // 获取热门问题列表
          var hotArray = new Array();

          var datas = XMLGetNodes(rspNode,"Data");
          var data = XMLGetNode(datas,0);

          var rowList = XMLGetNodes(data,"row");
          var nodeLength=XMLGetNodesLength(rowList);

          
          for(var i=0;i<nodeLength;i++)
          {
            var node=XMLGetNode(rowList,i);
            var hot = new Object();
              
            hot.id = XMLGetNamedAttr(node,"id");
            hot.question = XMLGetNamedAttr(node,"question");
            
            hotArray.push(hot);
          }

          showHotList(hotArray);
          break;
        default:
          break;
      }
    }
    else if(ecode==1)
    {
      alert("参数错误！");
    }
    else if(ecode==2)
    {
      alert("无效的cmd！");
    }
  }
  catch(e){}
}

// 问题分类显示
function showTypeList(typeArray)
{
  m_typeArray = typeArray;
  var len = typeArray.length;
  
  if(len==0) return;

  hide_typeList();

  disp += "<span class=\"typeList\"><br>"+infos[73]+"<table><tr><td colspan=3><hr style='margin-left:10px; '><td></tr><tr>";
  for(var i=0; i<len; i++)
  {
    var type = typeArray[i];
    var id = type.id;
    var name = type.name;

    if(i%3==2)
    {
      if(i==len-1)
      {
        disp += "<td align='left'>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='sendtext(\"GetHotList\", \""+id+"\")'><b>"+name+"</b></span></td></tr>";
      }
      else
      {
        disp += "<td align='left'>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='sendtext(\"GetHotList\", \""+id+"\")'><b>"+name+"</b></span></td></tr><tr>";
      }
    }
    else
    {
      disp += "<td align='left'>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='sendtext(\"GetHotList\", \""+id+"\")'><b>"+name+"</b></span></td>";
    }
  }
  if(len%3==0)
  {
    disp += "<tr><td align='left'>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='sendtext(\"GetHotList\", \"0\")'><b>"+infos[76]+"</b></span></td></tr><tr><td colspan=3><hr style='margin-left:10px; '><td></tr></table></span>";
  }
  else
  {
    disp += "<td align='left'>&nbsp;&nbsp;&nbsp;<span class='span-link' onclick='sendtext(\"GetHotList\", \"0\")'><b>"+infos[76]+"</b></span></td></tr><tr><td colspan=3><hr style='margin-left:10px; '><td></tr></table></span>";
  }

  document.getElementById("box-main-l-disp").innerHTML = disp;
  scrollToBottom();
}

function hide_typeList()
{
  try
  {
		var re = new RegExp("class=\"typeList\"", "gim");
		disp = disp.replace(re,'class=\"\" style=\"display:none\"');

		document.getElementById("box-main-l-disp").innerHTML = disp;
		scrollToBottom();
	}catch(e){}
}

// 该类热门问题显示
function showHotList(hotArray)
{
  var len = hotArray.length;

  if(len==0) return;

  disp += "<br>&nbsp;&nbsp;&nbsp;&nbsp;"+getTypeName(m_typeId)+"&nbsp;&nbsp;"+infos[74]+"<table>";
  for(var i=0; i<len; i++)
  {
    var hot = hotArray[i];
    var id = hot.id;
    var question = hot.question;

    disp += "<tr><td align='left'>&nbsp;&nbsp;&nbsp;"+(i+1)+". "+"<span class='span-link' onclick='getAnswer(\""+id+"\",\""+question.replace(/\\/g, "\\\\").replace(/&quot;/g, "\\&quot;")+"\")'><b>"+question+"</b></span></td></tr>";
  }
  disp += "</table>";

  document.getElementById("box-main-l-disp").innerHTML = disp;
  scrollToBottom();
}

// 问题列表显示
function showQuestionList(quesArray, oquesArray)
{
  m_oquesArray = oquesArray;

  var ques_len = quesArray.length;
  var oques_len = oquesArray.length;
  var msg = "";

  msg = "<font color=\"#666666\"><br />"+zsk_name+" "+infos[8]+"</font><br />";
  if(ques_len!=0)
  {
    msg += "<table><tr><td>"+infos[77]+"</td></tr>";
    for(var i=0; i<ques_len; i++)
    {
      var ques = quesArray[i];
      var id = ques.id;
      var question = ques.question;

      msg += "<tr><td align='left'>&nbsp;&nbsp;&nbsp;"+(i+1)+". "+"<span class='span-link' onclick='getAnswer(\""+id+"\", \""+question.replace(/\\/g, "\\\\").replace(/&quot;/g, "\\&quot;")+"\")'><b>"+question+"</b></span></td></tr>";
    }
    msg += "</table>";
    if(oques_len!=0)
    {
      msg += "<table>"+infos[78]+"<font color='red'> "+oques_len+" </font>"+infos[79]+"</table>";
    }
  }
  else if(oques_len!=0)
  {
    msg += infos[84]+"<br />";
    msg += "<table>"+infos[78]+"<font color='red'> "+oques_len+" </font>"+infos[79]+"</table>";
  }
  else if(ques_len==0 && oques_len==0)
  {
    msg = "<font color=\"#666666\"><br />"+zsk_name+" "+infos[8]+"</font><br />"+infos[84]+"<br />";
  }

  if(msg!="")
  {
    disp = disp+msg;
    document.getElementById("box-main-l-disp").innerHTML = disp;
    scrollToBottom();
  }
}

// 查看其他类别的类似问题
function lookOver()
{
  var oques_len = m_oquesArray.length;
  var msg = "<table>";
  for(var i=0; i<oques_len; i++)
  {
    var oques = m_oquesArray[i];
    var id = oques.id;
    var question = oques.question;

    msg += "<tr><td align='left'>&nbsp;&nbsp;&nbsp;"+(i+1)+". "+"<span class='span-link' onclick='getAnswer(\""+id+"\", \""+question.replace(/\\/g, "\\\\").replace(/&quot;/g, "\\&quot;")+"\")'><b>"+question+"</b></span></td></tr>";
  }
  msg += "</table>";

  disp = disp+msg;
  document.getElementById("box-main-l-disp").innerHTML = disp;
  scrollToBottom();
}

// 获取类型名
function getTypeName(styeId)
{
  var len = m_typeArray.length;

  for(var i=0; i<len; i++)
  {
    if(m_typeArray[i].id==styeId)
    {
      return m_typeArray[i].name;
    }
  }

  return infos[83];
}

// 获取问题答案
function getAnswer(id, question)
{
  var msg = "<div class='send-msg-name'>"+infos[13]+"&nbsp;"+infos[8]+":</div><p class='send-msg-content'>"+question.replace(/</g, "&lt;")+"</p>";
  display_msg2(msg);
  sendtext("GetAnswer", "", id);
}

// 发送访客消息，点发送按钮
function sendmsg() 
{   
  try
  {
    textCounter(document.getElementById("input1"), 1000);
  }catch(e){}
  msg = document.getElementById("input1").value;
  //检测输入字符 替换ASCII码小于32的
  for(var i=1;i<32;i++) { 
    special_char = String.fromCharCode(i);
    
    if(msg.indexOf(special_char) != -1 && (i != 13 && i != 10) ) {              
        reg_special = new RegExp(special_char, "ig");
        msg = msg.replace(reg_special,"");               
    }                 
  }
  msg = msg.trim();
	try{
    msg = msgFilter(msg);
  }catch(e){}
  //过滤超链接new lyc20140528
  var href_link = msg.match(/\[.[url|URL].=[A-Za-z0-9].*?\].*?\[\/.[url|URL].\]/g);
  if(href_link){
	var href_url = msg.toLowerCase().match(/\[.[url|URL].=.*?\]/g);
	if(href_url){
		var href_len = href_url.length;
		for(var i = 0; i < href_len; i++){
			var href_java = href_url[i].match(/javascript:/g);
			if(href_java) return false;
		}
	}
  }
  var show_msg = msg;

  if(m_success==false && lnkover!=200)
  {
    if(lnkover==2)
    {
      document.getElementById("send_tips").innerHTML = "<p>"+infos[88]+"</p>";
    }
    else
    {
      document.getElementById("send_tips").innerHTML = "<p>"+infos[89]+"</p>";
    }
    document.getElementById("send_tips").style.display = "block";
    setTimeout("hide_sendTips()", 1000);
    return;
  }
  else if(msg=="")
  {
    document.getElementById("send_tips").innerHTML = "<p>"+infos[90]+"</p>";
    document.getElementById("send_tips").style.display = "block";
    setTimeout("hide_sendTips()", 1000);
    return;
  }

  document.getElementById("input1").value = "";

  msg = UBBEncode(msg);
  msg = HtmlEncode(msg);
  msg = msg.trim();
  
  if(typeof(rec_stat)!="undefined" && rec_stat==1)
  {
    if(lnkover==200)
    {
        
      display_msg2("<div class='send-msg-name'>"+infos[13]+"&nbsp;"+infos[8]+":</div><p class='send-msg-content'>"+show_msg+"</p>");
      <!-- sendtext("GetQuestionList", m_typeId, "", UrlEncode(show_msg)); -->
		//更改成机器人咨询
        robot_main(msg);
      return;
    }
    else
    {
      display_msg2("<div class='send-msg-name'>"+infos[29]+":</div><p class='send-msg-content'>"+UBBCode(UBBEncode(lword_prompt))+"</p>");
    }
  }
  else
  {
    qstmsg(UrlEncode(msg));
  }

  show_msg = UBBEncode(show_msg);
  show_msg = HtmlEncode(show_msg);
  show_msg = UBBCode(show_msg);
  show_msg = show_msg.replace(/<br>/g, "<br>");
  
  if(minchat_style == 1 ){
    display_msg2("<div class='me'><p>"+infos[13]+"&nbsp;&nbsp;"+getTime2()+"</p><b class='g-arrows'><img src='../style/setting/ver06/img/suspend/blue-arrow.png'></img></b><div class='chat_word'>"+show_msg+"</div></div>");
  }else{
    display_msg2("<div class='me'><p>"+infos[13]+"&nbsp;&nbsp;"+getTime2()+"</p><b class='g-arrows'><img src='../style/chat/minichat2/img/arrow"+ minchat_style +".png'></img></b><div class='chat_word'>"+show_msg+"</div></div>");  
  }
  
  try{
    clearInterval(carousel_id);      
  }catch(e){}
}

function hide_sendTips()
{
  document.getElementById("send_tips").style.display = "none";
}

// 发送截图
function getSnapshotParam(pic_path, pic_name, state)
{
  var picc_path = pic_path;
  var picc_name = pic_name;
  var url = "http://www7.53kf.com/upload/snapshot/" + picc_path + "/" + picc_name;

  if(state=="200") {
    var msg = "<img src='"+url+"' class='snapimg' border='0' />";
    var ubb_img = "[IMG]"+url+"[/IMG]";
    display_msg("<font color=\"#666666\">"+infos[13]+": "+getTime2()+"</font><br>&nbsp;&nbsp;"+msg);
    qstmsg(ubb_img);
  } else if (state == '') {
    
  } else {
    var msg = "信息提示: 发送截图失败！"
    display_msg("<font color=\"red\">"+msg+"</font>");
  }
}

function keydown(evt)
{
  if(evt.altKey)
  {
    if(evt.keyCode==83) sendmsg();
  }
}

function keypress(evt)
{
  evt = evt ? evt : (window.event ? window.event : null); 
  
  var keynum ;
  if(window.event)
  {
        keynum = evt.keyCode;
  }
  else
  {
        keynum = evt.which;
  }

  if(postkey==1)
  {
    if(!evt.shiftKey && evt.keyCode==13)
    {
      sendmsg();
      return false;
    }
    else if(evt.ctrlKey && evt.keyCode==10)
    {
      //event.keyCode = 13;
      sendmsg();
    }
    return true;
  }
  if(postkey==2)
  {
    if(evt.ctrlKey && (evt.keyCode==10 || evt.keyCode ==13))
    {
      sendmsg();
      return false;
    }
    return true;
  }
}

function getPostkey()
{
  postkey = 1;
  if(getCookie2("53kf_postkey") != "")
  {
    postkey = getCookie2("53kf_postkey");
    if(postkey=="")
    {
      postkey = 1;
    }
  }
  if(postkey==1)
  {
    document.getElementById("line1-left").className = "pressdiv-line-left pkselect";
    document.getElementById("line2-left").className = "pressdiv-line-left";
  }
  else if(postkey==2)
  {
    document.getElementById("line1-left").className = "pressdiv-line-left";
    document.getElementById("line2-left").className = "pressdiv-line-left pkselect";
  }
}

function setpostkey(args)
{
  if(args==1)
  {
    document.getElementById("line1-left").className = "pressdiv-line-left pkselect";
    document.getElementById("line2-left").className = "pressdiv-line-left";
  }
  else if(args==2)
  {
    document.getElementById("line1-left").className = "pressdiv-line-left";
    document.getElementById("line2-left").className = "pressdiv-line-left pkselect";
  }
  showpkset();
  postkey = args;
  arr1 = setCookie2("53kf_postkey", postkey);
}

function display_status(stat)
{
  var stat = stat;
  document.getElementById("l-ts-wd").innerHTML=stat;
}

function display_msg(msg)
{
  disp += msg+"<br>";
  document.getElementById("box-main-l-disp").innerHTML = disp+"<br/>";
  scrollToBottom();
}

function display_msg2(msg)
{
  disp += msg;
  document.getElementById("box-main-l-disp").innerHTML = disp+"<br/>";
  scrollToBottom();
}

//访客端多窗口情况下，后续窗口对第一个窗口中信息的展示
function display_msg3(msg)
{
  disp = msg+disp;
  document.getElementById("box-main-l-disp").innerHTML = disp+"<br/>";
  scrollToBottom();
}

function display_msg_center(msg)
{
  document.getElementById("box-main-l-disp").innerHTML = "<table width='100%' height='100%' border='0' cellpadding='0' cellspacing='0'><tr><td align='center'><img src='../img/setting/wait.gif'><br><br><span style='font-size:12px;color:#888;'>"+msg+"</span></td></tr></table>";
}

function scrollToBottom(){// 滚动条置底
  try{
    setTimeout(function(){
      document.getElementById("box-main-l-disp").scrollTop += 100000;
    }, 10);
  }catch(e){}
}

function display_tool(msg)
{
  var msg_tool = infos[81]+" <span style='color:#0000CE; text-decoration:none; cursor:pointer;' onclick='sendtext(\"GetHotList\", \""+m_typeId+"\")'>"+msg+"</span> "+infos[82];
	if(company_tpl=="new2010"){
		document.getElementById("part_buttons_tool").innerHTML = '<div style="float:left; margin-top:5px; margin-left:3px;">&gt;&gt; 您正在咨询机器人';;
	}else{
		document.getElementById("part_buttons").innerHTML = '<div style="float:left; margin-top:5px; margin-left:3px;">&gt;&gt; 您正在咨询机器人';;
	}
}

function getPos(a,sProp) 
{
  var iPos = 0;
  while (a!=null) 
  {
    iPos+=a["offset" + sProp];
    a = a.offsetParent;
  }
  return iPos;
}

function showpkset()
{
  if(document.getElementById("pressdiv").style.display=="none")
  {
    document.getElementById("press_top").style.zIndex = 1;
    document.getElementById("pressdiv").style.display = "block";
  }
  else
  {
    document.getElementById("press_top").style.zIndex = 0;
    document.getElementById("pressdiv").style.display = "none";
  }
}

function changeclass(type,lineid)
{
  if (type=="over")
  {
    document.getElementById(lineid).className="pressdiv-line over";
  }
  else
  {
    document.getElementById(lineid).className="pressdiv-line";
  }
}

function closewindow()
{
  setTimeout('parent.window.opener=null;parent.window.close()', 1 );
}

// 插入链接
function toinsertlink()
{
  var type = typeof(arguments[0]) == 'undefined'?"link":arguments[0];
  var height = document.documentElement.clientHeight;
  var width = document.documentElement.clientWidth;

  createFreeze("insert_freeze", 0, 0, height, width);
  var words = new Array();
  words.push(infos[107]);
  words.push(infos[116]);
  words.push(infos[115]);
  words.push(infos[15]);
  words.push(infos[14]);
  createInsertDiv(type, height, width, words);
}

// 获取链接内容
function getLinkContent()
{
  var linkurl = document.getElementById("insert_link_url").value.trim();
  if(linkurl=="")
  {
    alert(infos[99]);
    document.getElementById("insert_link_url").focus();
  }
  else
  {
    var linktext = document.getElementById("insert_link_text").value.trim();
    if(linktext=="") linktext = linkurl;
    if(linkurl.substring(0,4).toLowerCase()!="http")
    {
      linkurl = "http://"+linkurl;
    }
    var html = "[URL="+linkurl+"]"+linktext+"[/URL]";
    document.getElementById("input1").value += html;
    if(typeof(arguments[0]) != "undefined") {
        destryInsertDiv(arguments[0]);    
    }else{
        destryInsertDiv("link");    
    }
    
    document.getElementById("input1").focus();
  }
}
//插入文件对象操作
var to_send_file_obj={
  ajaxuploadfile:function(){
    $.ajaxFileUpload({
            url:'upload_file.php?type=uploadfile',//处理图片脚本
            secureuri :false,
            fileElementId :'file_pic',//file控件id
            dataType : 'json',
            success : function (data, status){
              if(data.upload=='success'){
                $("#src-input").val(data.url);
                 upload_file_name=data.real_name;
                 $("#real_filename_hidden").val(data.real_name);
              }else if(data.upload=='fail'){
                alert('上传文件失败');
              }

              if(data.filetype=='error'){
                alert('仅支持fla/pdf/txt/doc/xls/docx/xlsx/tmp/html/wps/ppt/bmp/gif/jpeg/png/swf/jpg/avi/mpeg/asf/wmv/rm/rmvb/mp3/ape/wma/wav/zip/rar');
              }
              if(data.maxsize=='true'){
                alert('文件必须小于4M');
              }
              
            },
            error: function(data, status, e){
                alert(e);
            }
      });
  },
  sendfiles : function(){
    if(upload_file_name==""){
      alert('您未上传文件');
      return false;
    }
      try
      {
        
        var file_url = "http://"+host+"/down_file.php?type=srv&file="+upload_file_name;
        
        display_msg("<span>• "+infos[42]+" \"<a href=\""+file_url.substring(0,file_url.lastIndexOf("*"))+"\" target=\"_blank\" style='text-decoration:underline;color:#8A2BE2;'>"+upload_file_name.substring(upload_file_name.lastIndexOf("*")+1)+"</a>\"</span>");
        
        file_url = UrlEncode(file_url);
        
        send_FIL(file_url); // 发送文件给客服

        display_msg("<span>• "+infos[70]+"</span>");
        upload_file_name = "";
        clearInterval(carousel_id);
      }catch(e){}
      return true;
    
  }

};


//插入图片对象操作
var to_insert_img_obj = {
  sendimg : function(urlstr){
    if(urlstr==""||urlstr=="请输入网络地址或点击浏览上传"){
      alert('图片路径不能为空');
      return false;
    }
    var urlcode='[IMG]'+urlstr+'[/IMG]';
    to_insert_img_obj.sendimgmsg(urlcode);
    return true;
  },
  ajaxuploadimg:function(){
    $.ajaxFileUpload({
            url:'upload_img.php?type=visiter',//处理图片脚本
            secureuri :false,
            fileElementId :'img_pic',//file控件id
            dataType : 'json',
            success : function (data, status){

              if(data.upload=='success'){
                $("#src-input").val(data.url);
              }else if(data.upload=='fail'){
                 alert('上传文件失败');
              }
         
              if(data.filetype=='error'){
               alert('仅支持jpg、jpeg、gif、png格式');
              }
              if(data.maxsize=='true'){
                alert('仅支持文件小于2M');
              }
              
            },
            error: function(data, status, e){
                alert(e);
            }
      });
  },
  sendimgmsg:function(msg){
    msg = msg.trim();
    try{
      msg = msgFilter(msg);
    }catch(e){}
    var show_msg = msg;

    if(m_success==false && lnkover!=200)
    {
      if(lnkover==2)
      {
        document.getElementById("send_tips").innerHTML = "<p>"+infos[88]+"</p>";
      }
      else
      {
        document.getElementById("send_tips").innerHTML = "<p>"+infos[89]+"</p>";
      }
      document.getElementById("send_tips").style.display = "block";
      setTimeout("hide_sendTips()", 1000);
      return;
    }
    else if(msg=="")
    {
      document.getElementById("send_tips").innerHTML = "<p>"+infos[90]+"</p>";
      document.getElementById("send_tips").style.display = "block";
      setTimeout("hide_sendTips()", 1000);
      return;
    }

    document.getElementById("input1").value = "";

    msg = UBBEncode(msg);
    msg = HtmlEncode(msg);
    msg = msg.trim();
    

    if(typeof(rec_stat)!="undefined" && rec_stat==1)
    {
      if(lnkover==200)
      {
        display_msg2("<div class='send-msg-name'>"+infos[13]+"&nbsp;"+infos[8]+":</div><p class='send-msg-content'>"+show_msg+"</p>");
        sendtext("GetQuestionList", m_typeId, "", UrlEncode(show_msg));
        //更改成机器人咨询
        if(chatrobot==1) chatRobot();
        return;
      }
      else
      {
        display_msg2("<div class='send-msg-name'>"+infos[29]+":</div><p class='send-msg-content'>"+UBBCode(UBBEncode(lword_prompt))+"</p>");
      }
    }
    else
    {
      qstmsg(UrlEncode(msg));
    }

    show_msg = UBBEncode(show_msg);
    show_msg = HtmlEncode(show_msg);
    show_msg = UBBCode(show_msg);
    show_msg = show_msg.replace(/<br>/g, "<br>");

    display_msg2("<div class='send-msg-name'>"+infos[13]+"&nbsp;"+getTime2()+"</div><p class='send-msg-content'>"+show_msg+"</p>");
   
   try{
    clearInterval(carousel_id);
   }catch(e){}
  }
};
// 插入图片

function toinsertimg()
{  
  if(typeof($('#dialogUpImg').val()) != "undefined") {
    $('#dialogUpImg').remove();
    return;  
  }
  if(arguments[0] == 'dz8') {//定制版
  $('<div id="dialogUpImg" class="dialogs" style="top: 57px; left: 15px; height: 180px; width: 290px; border: 1px solid rgb(51, 153, 204); position: absolute; font-size: 14px; z-index: 9999; background: url(/img/pf_bg.gif) repeat-x;"><div style="float:right;margin-top:8px;margin-right:8px;width:12px;height:12px;cursor:pointer;background:url(../style/chat/minichat2/img/minchat_ns_dz8.png) -18px 0 no-repeat;" onclick="$(\'#dialogUpImg\').remove();"></div><div style=""><p style="margin: 0;background: #139ea1;color: #fff;font-size: 14px;line-height: 30px;text-align: left;padding-left: 10px;">图片上传</p><table cellpadding="0" cellspacing="8" border="0" width="100%" align="center" style="padding-top: 5px;"><tbody><tr><td style="text-align: left; padding-right:5px;position: relative;"><input id="src-input" type="text" class="comm-tbox" placeholder="请上传图片或输入地址" style="width: 200px; line-height: 24px; height: 24px;float: left;border: 1px solid #ddd;padding: 1px 5px;" onkeypress="if(event.keyCode==13){getLinkContent();try{window.focus();}catch(e){}return false;}"><input id="img_pic" name="userimg" type="file" value="浏览" onchange="to_insert_img_obj.ajaxuploadimg();" style="width: 66px;  height: 28px;-moz-opacity: 0.0;  filter: alpha(opacity=0);  opacity: 0;position: absolute;z-index: 5;"><span style="position: absolute;display: block;width: 51px;height: 26px;line-height: 26px;right: 5px;border: 1px solid #ddd;background: #fff;padding-left: 5px;z-index: 4;">浏览..</span></td></tr><tr><td style="text-align: left; font-size:12px;padding-bottom: 5px; color:red;">*仅支持JPG、JPEG、GIF、PNG格式，文件大小2M以内</td></tr><tr><td style=" text-align:right;padding-top: 36px;"><span style="padding-right:5px;"><input type="button" value="确定" onclick="if(to_insert_img_obj.sendimg($(\'#src-input\').val()))$(\'#dialogUpImg\').remove();" style="width: 78px;height: 31px;background:url(../style/chat/minichat2/img/dialog_send.png) no-repeat; border:none; text-indent:100em;"></span></td></tr></tbody></table></div></div>').appendTo(body);
    return;
  }
  if(arguments[0] == 'dz9') {//定制版
  $('<div id="dialogUpImg" class="dialogs" style="top: 57px; left: 45px; height: 180px; width: 290px; border: 1px solid #000; border-radius:5px; overflow:hidden; position: absolute; font-size: 14px; z-index: 9999; background: #f9f3f1;"><div style="float:right;margin-top:8px;margin-right:8px;width:12px;height:12px;cursor:pointer;background:url(../style/chat/minichat2/img/minchat_ns_dz8.png) -18px 0 no-repeat;" onclick="$(\'#dialogUpImg\').remove();"></div><div style=""><p style="margin: 0;background: #000;color: #fff;font-size: 14px;line-height: 30px;text-align: left;padding-left: 10px;">图片上传</p><table cellpadding="0" cellspacing="8" border="0" width="100%" align="center" style="padding-top: 5px;"><tbody><tr><td style="text-align: left; padding-right:5px;position: relative;"><input id="src-input" type="text" class="comm-tbox" placeholder="请上传图片或输入图片地址" style="width: 200px; line-height: 24px; height: 24px;float: left;border: 1px solid #ddd;padding: 1px 5px;" onkeypress="if(event.keyCode==13){getLinkContent();try{window.focus();}catch(e){}return false;}"><input id="img_pic" name="userimg" type="file" value="浏览" onchange="to_insert_img_obj.ajaxuploadimg();" style="width: 66px;  height: 28px;-moz-opacity: 0.0;  filter: alpha(opacity=0);  opacity: 0;position: absolute;z-index: 5;"><span style="position: absolute;display: block;width: 51px;height: 26px;line-height: 26px;right: 5px;border: 1px solid #ddd;background: #fff;padding-left: 5px;z-index: 4;">浏览..</span></td></tr><tr><td style="text-align: left; font-size:12px;padding-bottom: 5px; color:red;">*仅支持JPG、JPEG、GIF、PNG，大小2M以内</td></tr><tr><td style=" text-align:center;padding-top: 36px;"><span style="padding-right:5px;"><input type="button" value="确定" onclick="if(to_insert_img_obj.sendimg($(\'#src-input\').val()))$(\'#dialogUpImg\').remove();" style="width: 78px;height: 31px;background:url(../style/chat/minichat2/img/dialog_send9.png) no-repeat; border:none; color:#000; font-size:14px;"></span></td></tr></tbody></table></div></div>').appendTo(body);
    return;
  }
  if(arguments[0] == 'dz10') {//定制版
  $('<div id="dialogUpImg" class="dialogs" style="top: 57px; left: 55px; height: 180px; width: 290px; border: 1px solid #909fa8; border-radius:10px; overflow:hidden; position: absolute; font-size: 14px; z-index: 9999; background: #fff;"><div style="float:right;margin-top:6px;margin-right:6px;width:15px;height:15px;cursor:pointer;background:url(../style/chat/minichat2/img/close_llt.png) right center no-repeat;" onclick="$(\'#dialogUpImg\').remove();"></div><div style=""><p style="margin: 0;background:url(../style/chat/minichat2/img/dialog_top_bg.png) repeat-x;color: #525c63;font-size: 14px;line-height: 30px;text-align: left;padding-left: 10px;">图片上传</p><table cellpadding="0" cellspacing="8" border="0" width="100%" align="center" style="padding-top: 5px;"><tbody><tr><td style="text-align: left; padding-right:5px;position: relative;"><input id="src-input" type="text" class="comm-tbox" placeholder="请上传图片或输入图片地址" style="width: 200px; line-height: 24px; height: 24px;float: left;border: 1px solid #ddd;padding: 1px 5px;" onkeypress="if(event.keyCode==13){getLinkContent();try{window.focus();}catch(e){}return false;}"><input id="img_pic" name="userimg" type="file" value="浏览" onchange="to_insert_img_obj.ajaxuploadimg();" style="width: 66px;  height: 28px;-moz-opacity: 0.0;  filter: alpha(opacity=0);  opacity: 0;position: absolute;z-index: 5;"><span style="position: absolute;display: block;width: 51px;height: 26px;line-height: 26px;right: 5px;border: 1px solid #ddd;background: #fff;padding-left: 5px;z-index: 4;">浏览..</span></td></tr><tr><td style="text-align: left; font-size:12px;padding-bottom: 5px; color:red;">*仅支持JPG、JPEG、GIF、PNG，大小2M以内</td></tr><tr><td style=" text-align:center;padding-top: 36px;"><span><input type="button" value="确定" onclick="if(to_insert_img_obj.sendimg($(\'#src-input\').val()))$(\'#dialogUpImg\').remove();" style="width: 78px;height: 27px;background:url(../style/chat/minichat2/img/btn_send1.png) no-repeat; border:none; color:#fff; font-size:14px;"></span></td></tr></tbody></table></div></div>').appendTo(body);
    return;
  }
  if(window.location.href.indexOf("tpl=minichat2")!=-1){
    $('<div id="dialogUpImg" class="dialogs" style="display:block;position:absolute;top:75px;left:25px;background:#fafafa;z-index:200000000;width:350px;"><style>\
 .img_load_lh .head {\
  height: 30px; line-height: 30px; background: #ddd; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); text-align: left;\
}\
.img_load_lh .head strong.title {\
  padding-left: 10px; color: #333;\
}\
 .img_load_lh .head .close {\
  display: block; width: 20px; height: 20px; font-size: 17px; line-height: 20px; text-align: center; position: absolute; top: 3px; right: 5px;\
}\
  .img_load_lh .uploadImg{\
  display: block;border: 1px solid #999;width: 55px;height: 25px;position: absolute;right: 25px;top: 55px;line-height: 25px;text-align: center;background-color: #eee;\
}.img_load_lh .head .close:hover {\
  text-decoration: none; color: #c00; \
}.img_load_lh .btns {\
  position: relative; margin-top:10px; left: 0; width: 100%; text-align: left;\
}\
 .img_load_lh .btn-complete, .img_load_lh .btn-cancel {\
 margin-bottom: 10px; display:inline-block; font-size: 11px; font-weight:bold; padding: 2px 15px; border-radius:2px;\
}\
 .img_load_lh .btns .btn-complete {\
  margin-right: 30px; float: right; color:#fff; background:#f7af1f; border:1px solid #e7840f;\
}\
 .img_load_lh .btns .btn-cancel {\
  margin-left: 30px; color:#555; background:#eee; border:1px solid #b3b3b3;\
}\
.img_load_lh .btn-cancel:hover{\
 text-decoration: none; text-decoration: none; background:#f3f3f3; border:1px solid #a5a5a5; box-shadow:0 1px 1px rgba(0, 0, 0, 0.1);\
}\
.img_load_lh .btn-complete:hover {\
 text-decoration: none; background:#f7ba3f; border:1px solid #d5780b; box-shadow:0 1px 1px rgba(250, 138, 0, 0.3);\
}\
 .img_load_lh .comm-tbox {\
  position:absolute; left:10px;top:0;width: 276px;padding-left:5px; height: 25px; line-height: 25px; border: 1px solid #666;margin-top:9px; box-shadow: inset 1px 2px 0 rgba(0, 0, 0, 0.15);color:#999999;\
}\
 .img_load_lh p {\
  margin: 15px 10px 0; *margin-left: 5px;\
}\
 .img_load_lh p.uComment {\
  color: #999; font-size:12px; text-align:left; font-family:arial;\
}\
 .img_load_lh .choice{\
  width:300px;position:relative;border-left:1px solid #aaa;border-top:1px solid #aaa;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background-color:#FFF;margin:10px;\
}\
.img_load_lh{\
background-color: #fafafa; border: 1px solid #aaa; position:relative;z-index: 200000000;box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);border-radius: 3px;\
}\
.img_load_lh .choice span{display:block;}\
#inputUploadImg {\
  height: 30px; *height: 28px; position: absolute; right: 23px; *right: 5px; top: 53px; *top: 55px; width: 61px; *width: 58px; opacity: 0; filter:alpha(opacity=0); cursor: pointer;\
}</style><div class="img_load_lh"><div class="head"><strong class="title">'+infos[148]+'</strong><a class="close" href="#" onclick="$(\'#dialogUpImg\').remove();">×</a></div>\
    <div style="position:relative;height:35px;"><input id="src-input" class="comm-tbox" type="text" target="blank" value="'+infos[149]+'" onFocus="if(this.value==\''+infos[149]+'\') this.value=\'\';" onblur="if(this.value==\'\')this.value=\''+infos[149]+'\'">\
       <input type="file" id="img_pic" name="userimg" onchange="to_insert_img_obj.ajaxuploadimg();" style="cursor: pointer;font-size: 9px;position:absolute;width:43px;height:30px;z-index:4;top:8px;right:10px;-moz-opacity: 0.0;filter: alpha(opacity=0);opacity:0;"/><span style="background-color:#F6F6F6;border-left:1px solid #666666;border-top:1px solid #666666;border-right:1px solid #AAAAAA;border-bottom:1px solid #AAAAAA;display:block;height:27px;line-height:27px;position:absolute;right:8px;text-align:center;top:9px;width:46px;z-index:3;">'+infos[150]+'</span></div>\
    <p class="uComment">*'+infos[151]+'</p>\
    <div class="btns"><a href="#" class="btn-complete" onclick="if(to_insert_img_obj.sendimg($(\'#src-input\').val())) $(\'#dialogUpImg\').remove();">'+infos[152]+'</a><a href="#" class="btn-cancel" onclick="$(\'#dialogUpImg\').remove();">'+infos[153]+'</a></div></div></div>').appendTo(body);
  }else{
    $('<div id="dialogUpImg" class="dialogs" style="display:block;position:absolute;top:150px;left:25px;background:#fafafa;z-index:200000000;width:350px;"><style>\
 .img_load_lh .head {\
  height: 30px; line-height: 30px; background: #ddd; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\
}\
.img_load_lh .head strong.title {\
  padding-left: 10px; color: #333;\
}\
 .img_load_lh .head .close {\
  display: block; width: 20px; height: 20px; font-size: 17px; line-height: 20px; text-align: center; position: absolute; top: 3px; right: 5px;\
}\
  .img_load_lh .uploadImg{\
  display: block;border: 1px solid #999;width: 55px;height: 25px;position: absolute; right: 25px;top: 55px;line-height: 25px;text-align: center;background-color: #eee;\
}.img_load_lh .head .close:hover {\
  text-decoration: none; color: #c00;\
}.img_load_lh .btns {\
  position: relative; margin-top:10px; left: 0; width: 100%;\
}\
 .img_load_lh .btn-complete, .img_load_lh .btn-cancel {\
 margin-bottom: 10px; display:inline-block; font-size: 11px; font-weight:bold; padding: 2px 15px; border-radius:2px;\
}\
 .img_load_lh .btns .btn-complete {\
  margin-right: 10px; float: right; color:#fff; background:#f7af1f; border:1px solid #e7840f;\
}\
 .img_load_lh .btns .btn-cancel {\
  margin-left: 10px; color:#555; background:#eee; border:1px solid #b3b3b3;\
}\
.img_load_lh .btn-cancel:hover{\
 text-decoration: none; text-decoration: none; background:#f3f3f3; border:1px solid #a5a5a5; box-shadow:0 1px 1px rgba(0, 0, 0, 0.1);\
}\
.img_load_lh .btn-complete:hover {\
 text-decoration: none; background:#f7ba3f; border:1px solid #d5780b; box-shadow:0 1px 1px rgba(250, 138, 0, 0.3);\
}\
 .img_load_lh .comm-tbox {\
  width: 291px; height: 25px; line-height: 25px; border: 1px solid #666;margin-top:9px; box-shadow: inset 1px 2px 0 rgba(0, 0, 0, 0.15);\
}\
 .img_load_lh p {\
  margin: 15px 10px 0; *margin-left: 5px;\
}\
 .img_load_lh p.uComment {\
  color: #999; font-size:12px;\
}\
 .img_load_lh .choice{\
  width:300px;position:relative;border-left:1px solid #aaa;border-top:1px solid #aaa;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background-color:#FFF;margin:10px;\
}\
.img_load_lh{\
display: block; width: 350px; background: #fafafa; border: 1px solid #aaa; position:absolute;z-index: 200000000;box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);border-radius: 3px;\
}\
.img_load_lh .choice span{display:block;}\
#inputUploadImg {\
  height: 30px; *height: 28px; position: absolute; right: 23px; *right: 5px; top: 53px; *top: 55px; width: 61px; *width: 58px; opacity: 0; filter:alpha(opacity=0); cursor: pointer;\
}</style><div class="img_load_lh" style="position:relative;"><div class="head"><strong class="title">'+infos[148]+'</strong><a class="close" href="#" onclick="$(\'#dialogUpImg\').remove();" hidefocus="">×</a></div>\
    <p><table border="0" cellpadding="0" cellspacing="0"><tr><td><input id="src-input" class="comm-tbox" type="text" target="blank" value="'+infos[149]+'" onFocus="if(this.value==\''+infos[149]+'\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\''+infos[149]+'\'">\
        </td><td><input type="file" id="img_pic" name="userimg" onchange="to_insert_img_obj.ajaxuploadimg();" style="cursor: pointer;font-size: 9px;position:absolute;width:43px;height:30px;z-index:4;top:53px;-moz-opacity: 0.0;filter: alpha(opacity=0);opacity:0;"/><span style="background-color:#F6F6F6;border-left:1px solid #666666;border-top:1px solid #666666;border-right:1px solid #AAAAAA;border-bottom:1px solid #AAAAAA;display:block;height:29px;line-height:25px;position:absolute;right:10px;text-align:center;top:53px;*top:53px;width:46px;z-index:3;">'+infos[150]+'</span></td></tr></table></p>\
    <p class="uComment">*'+infos[151]+'</p>\
    <div class="btns"><a href="#" class="btn-complete" onclick="if(to_insert_img_obj.sendimg($(\'#src-input\').val()))$(\'#dialogUpImg\').remove();">'+infos[152]+'</a><a href="#" class="btn-cancel" onclick="$(\'#dialogUpImg\').remove();">'+infos[153]+'</a></div></div></div>').appendTo(body);
  }
  
}


// 获取图片内容
function getImageContent()
{
  var imagePath = document.getElementById("insert_image_url").value.trim();
  if(imagePath=="")
  {
    alert(infos[99]);
    document.getElementById("insert_image_url").focus();
  }
  else
  {
    var html = "[IMG]"+imagePath+"[/IMG]";
    document.getElementById("input1").value += html;
    destryInsertDiv("image");
    document.getElementById("input1").focus();
  }
}

function toinsertHTML()
{
  var msgHTML = prompt(infos[16], '');
  if(msgHTML==null || msgHTML.trim()=="") return;
  msgHTML = msgHTML.replace(new RegExp('<scr'+'ipt[^>]*?>.*?</scr'+'ipt>','g'), "") ;
  msgHTML = msgHTML.replace(new RegExp('\<\!\-\-.*?\-\-\>','g'), "") ;
  msgHTML = msgHTML.replace('\<\!\-\-', "") ;
  msgHTML += "</a>";
  display_msg("<font color=\"#666666\">"+infos[13]+": "+getTime2()+"</font><br>&nbsp;&nbsp;"+msgHTML.trim());
  qstmsg(msgHTML.trim());
}

// 插入表情
function toinsertsmile()
{
	if ($("#face_src").attr('src') == '') $("#face_src").attr('src', "face.php?company_id="+company_id+"&locate="+locate); // 加载表情
  document.getElementById("face_div").style.display = document.getElementById("face_div").style.display==""?"none":"";
}

function insertsmile(smilename)
{
  document.getElementById("face_div").style.display = "none";
  document.getElementById("input1").value += smilename;
  document.getElementById("input1").focus();
}

var upload_file_name = "";
var up_time = null;
var is_upload_file = 0;
function getUpStat()
{
  if(upload_file_name!="")
  {
    clearInterval(up_time);
    is_upload_file = 0;

    var file_url = "http://"+host+"/down_file.php?type=srv&file="+upload_file_name;
    file_url = UrlEncode(file_url);

    send_FIL(file_url); // 发送文件给客服

    display_msg("<span>• "+infos[70]+"</span>");
    upload_file_name = "";
    closeUpload();
  }
}

// 开始上传文件
function start_getUpStat(filename)
{
  upload_file_name = "";
  is_upload_file = 1;
  display_msg("<span>• "+infos[42]+" \"<a href=\""+filename+"\" target=\"_blank\" style='text-decoration:underline;color:#8A2BE2;'>"+filename.substring(filename.lastIndexOf("\\")+1)+"</a>\"</span>");
  up_time = setInterval(getUpStat,500);
}

function closeUpload()
{
  document.getElementById("upload_iframe").src="";
  document.getElementById("uploaddiv").style.display="none";
}

function show_file()
{
  if(typeof($('#dialogUpImg').val()) != "undefined") {
    $('#dialogUpImg').remove();
    return;  
  }
  
  if(arguments[0] == 'dz8') {//定制版
  $('<div id="dialogUpImg" class="dialogs" style="top: 57px; left: 15px; height: 180px; width: 290px; border: 1px solid rgb(51, 153, 204); position: absolute; font-size: 14px; z-index: 9999; background: url(/img/pf_bg.gif) repeat-x;"><div style="float:right;margin-top:8px;margin-right:8px;width:12px;height:12px;cursor:pointer;background:url(../style/chat/minichat2/img/minchat_ns_dz8.png) -18px 0 no-repeat;" onclick="$(\'#dialogUpImg\').remove();"></div><div style=""><p style="margin: 0;background: #139ea1;color: #fff;font-size: 14px;line-height: 30px;text-align: left;padding-left: 10px;">文件上传</p><table cellpadding="0" cellspacing="8" border="0" width="100%" align="center" style="padding-top: 5px;"><tbody><tr><td style="text-align: left; padding-right:5px;position: relative;"><input id="src-input" type="text" class="comm-tbox" placeholder="请点击上传文件" style="width: 200px; line-height: 24px; height: 24px;float: left;border: 1px solid #ddd;padding: 1px 5px;" onkeypress="if(event.keyCode==13){getLinkContent();try{window.focus();}catch(e){}return false;}"><input id="file_pic" name="userfile" type="file" value="浏览" onchange="to_send_file_obj.ajaxuploadfile();" style="width: 66px;  height: 28px;-moz-opacity: 0.0;  filter: alpha(opacity=0);  opacity: 0;position: absolute;z-index: 5;"><span style="position: absolute;display: block;width: 51px;height: 26px;line-height: 26px;right: 5px;border: 1px solid #ddd;background: #fff;padding-left: 5px;z-index: 4;">浏览..</span></td></tr><tr><td style="text-align: left; font-size:12px;padding-bottom: 5px; color:red;">*文件发送支持常用文档、影音、图片、压缩文件发送，文件大小不超过4M。</td></tr><tr><td style=" text-align:right;padding-top: 22px;"><span style="padding-right:5px;"><input type="button" value="确定" onclick="if(to_send_file_obj.sendfiles())$(\'#dialogUpImg\').remove();" style="width: 78px;height: 31px;background:url(../style/chat/minichat2/img/dialog_send.png) no-repeat; border:none; text-indent:100em;"></span></td></tr></tbody></table></div></div>').appendTo(body);
    return;
  }
  if(arguments[0] == 'dz9') {//定制版
    $('<div id="dialogUpImg" class="dialogs" style="top: 57px; left: 45px; height: 180px; width: 290px; border: 1px solid #000; position: absolute; border-radius:5px; overflow:hidden; font-size: 14px; z-index: 9999; background: #f9f3f1;"><div style="float:right;margin-top:8px;margin-right:8px;width:12px;height:12px;cursor:pointer;background:url(../style/chat/minichat2/img/minchat_ns_dz8.png) -18px 0 no-repeat;" onclick="$(\'#dialogUpImg\').remove();"></div><div style=""><p style="margin: 0;background: #000;color: #fff;font-size: 14px;line-height: 30px;text-align: left;padding-left: 10px;">文件上传</p><table cellpadding="0" cellspacing="8" border="0" width="100%" align="center" style="padding-top: 5px;"><tbody><tr><td style="text-align: left; padding-right:5px;position: relative;"><input id="src-input" type="text" class="comm-tbox" placeholder="请点击上传文件" style="width: 200px; line-height: 24px; height: 24px;float: left;border: 1px solid #ddd;padding: 1px 5px;" onkeypress="if(event.keyCode==13){getLinkContent();try{window.focus();}catch(e){}return false;}"><input id="file_pic" name="userfile" type="file" value="浏览" onchange="to_send_file_obj.ajaxuploadfile();" style="width: 66px;  height: 28px;-moz-opacity: 0.0;  filter: alpha(opacity=0);  opacity: 0;position: absolute;z-index: 5;"><span style="position: absolute;display: block;width: 51px;height: 26px;line-height: 26px;right: 5px;border: 1px solid #ddd;background: #fff;padding-left: 5px;z-index: 4;">浏览..</span></td></tr><tr><td style="text-align: left; font-size:12px;padding-bottom: 5px; color:red;">*文件发送支持常用文档、影音、图片、压缩文件的发送，请控制您的发送文件大小不超过4M。</td></tr><tr><td style=" text-align:center;padding-top: 22px;"><span style="padding-right:5px;"><input type="button" value="确定" onclick="if(to_send_file_obj.sendfiles())$(\'#dialogUpImg\').remove();" style="width: 78px;height: 31px;background:url(../style/chat/minichat2/img/dialog_send9.png) no-repeat; border:none; color:#000; font-size:14px;"></span></td></tr></tbody></table></div></div>').appendTo(body);
    return;
  }  
  if(window.location.href.indexOf("tpl=minichat2")!=-1){
    $('<div id="dialogUpImg" class="dialogs" style="display:block;position:absolute;top:60px;left:25px;background:#fafafa;z-index:200000000;width:350px;"><style>\
 .img_load_lh .head {\
  height: 30px; line-height: 30px; background: #ddd; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);text-align:left;\
}\
.img_load_lh .head strong.title {\
  padding-left: 10px; color: #333;\
}\
 .img_load_lh .head .close {\
  display: block; width: 20px; height: 20px; font-size: 17px; line-height: 20px; text-align: center; position: absolute; top: 3px; right: 5px;\
}\
  .img_load_lh .uploadImg{\
  display: block;border: 1px solid #999;width: 55px;height: 25px;position: absolute;*position:relative;_position:relative;right: 25px;top: 55px;line-height: 25px;text-align: center;background-color: #eee;\
}.img_load_lh .head .close:hover {\
  text-decoration: none; color: #c00;\
}.img_load_lh .btns {\
  position: relative; margin-top:10px; left: 0; width: 100%; text-align:left;\
}\
 .img_load_lh .btn-complete, .img_load_lh .btn-cancel {\
 margin-bottom: 10px; display:inline-block; font-size: 11px; font-weight:bold; padding: 2px 15px; border-radius:2px;\
}\
 .img_load_lh .btns .btn-complete {\
  margin-right: 30px; float: right; color:#fff; background:#f7af1f; border:1px solid #e7840f;\
}\
 .img_load_lh .btns .btn-cancel {\
  margin-left: 30px; color:#555; background:#eee; border:1px solid #b3b3b3;\
}\
.img_load_lh .btn-cancel:hover{\
 text-decoration: none; text-decoration: none; background:#f3f3f3; border:1px solid #a5a5a5; box-shadow:0 1px 1px rgba(0, 0, 0, 0.1);\
}\
.img_load_lh .btn-complete:hover {\
 text-decoration: none; background:#f7ba3f; border:1px solid #d5780b; box-shadow:0 1px 1px rgba(250, 138, 0, 0.3);\
}\
 .img_load_lh .comm-tbox {\
  width: 276px;padding-left:5px;color:#999999; height: 25px; line-height: 25px; border: 1px solid #666;left:10px;top:5px;position:absolute; box-shadow: inset 1px 2px 0 rgba(0, 0, 0, 0.15);\
}\
 .img_load_lh p {\
  margin: 10px 10px 0; *margin-left: 5px;\
}\
 .img_load_lh p.uComment {\
  color: #999; font-size:12px; text-align:left;word-break:break-all;\
}\
 .img_load_lh .choice{\
  width:300px;position:relative;border-left:1px solid #aaa;border-top:1px solid #aaa;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background-color:#FFF;margin:10px;\
}\
.img_load_lh{\
display: block; width: 350px; background: #fafafa; border: 1px solid #aaa; position:relative;z-index: 200000000;box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);border-radius: 3px;\
}\
.img_load_lh .choice span{display:block;}\
#inputUploadImg {\
  height: 30px; *height: 28px; position: absolute; right: 23px; *right: 5px; top: 53px; *top: 55px; width: 61px; *width: 58px; opacity: 0; filter:alpha(opacity=0); cursor: pointer;\
}</style><div class="img_load_lh"><div class="head"><strong class="title">'+infos[154]+'</strong><a class="close" href="#" onclick="$(\'#dialogUpImg\').remove();">×</a></div>\
    <div style="position:relative;height:35px;margin-top:5px;"><input id="src-input" class="comm-tbox" type="text" target="blank" value="'+infos[155]+'" onFocus="if(this.value==\''+infos[155]+'\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\''+infos[155]+'\'"><input type="hidden" id="real_filename_hidden">\<input type="file" id="file_pic" name="userfile" onchange="to_send_file_obj.ajaxuploadfile();" style="cursor: pointer;font-size: 9px;position:absolute;width:43px;height:27px;z-index:4;top:5px;-moz-opacity: 0.0;filter: alpha(opacity=0);opacity:0;right:13px;"/><span style="background-color:#F6F6F6;border-left:1px solid #666666;border-top:1px solid #666666;border-right:1px solid #AAAAAA;border-bottom:1px solid #AAAAAA;display:block;height:27px;line-height:25px;position:absolute;right:10px;text-align:center;top:5px;width:46px;z-index:3;">'+infos[150]+'</span></div>\
    <p class="uComment">'+infos[156]+'</p>\
    <div class="btns"><a href="#" class="btn-complete" onclick="if(to_send_file_obj.sendfiles())$(\'#dialogUpImg\').remove();">'+infos[152]+'</a><a href="#" class="btn-cancel" onclick="$(\'#dialogUpImg\').remove();">'+infos[153]+'</a></div></div></div>').appendTo(body);

  }else{
    $('<div id="dialogUpImg" class="dialogs" style="display:block;position:absolute;top:135px;left:25px;background:#fafafa;z-index:200000000;width:350px;"><style>\
 .img_load_lh .head {\
  height: 30px; line-height: 30px; background: #ddd; box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);\
}\
.img_load_lh .head strong.title {\
  padding-left: 10px; color: #333;\
}\
 .img_load_lh .head .close {\
  display: block; width: 20px; height: 20px; font-size: 17px; line-height: 20px; text-align: center; position: absolute; top: 3px; right: 5px;\
}\
  .img_load_lh .uploadImg{\
  display: block;border: 1px solid #999;width: 55px;height: 25px;position: absolute;right: 25px;top: 55px;line-height: 25px;text-align: center;background-color: #eee;\
}.img_load_lh .head .close:hover {\
  text-decoration: none; color: #c00;\
}.img_load_lh .btns {\
  position: relative; margin-top:10px; left: 0; width: 100%;\
}\
 .img_load_lh .btn-complete, .img_load_lh .btn-cancel {\
 margin-bottom: 10px; display:inline-block; font-size: 11px; font-weight:bold; padding: 2px 15px; border-radius:2px;\
}\
 .img_load_lh .btns .btn-complete {\
  margin-right: 10px; float: right; color:#fff; background:#f7af1f; border:1px solid #e7840f;\
}\
 .img_load_lh .btns .btn-cancel {\
  margin-left: 10px; color:#555; background:#eee; border:1px solid #b3b3b3;\
}\
.img_load_lh .btn-cancel:hover{\
 text-decoration: none; text-decoration: none; background:#f3f3f3; border:1px solid #a5a5a5; box-shadow:0 1px 1px rgba(0, 0, 0, 0.1);\
}\
.img_load_lh .btn-complete:hover {\
 text-decoration: none; background:#f7ba3f; border:1px solid #d5780b; box-shadow:0 1px 1px rgba(250, 138, 0, 0.3);\
}\
 .img_load_lh .comm-tbox {\
  width: 313px; height: 25px; line-height: 25px; border: 1px solid #666;margin-top:9px; box-shadow: inset 1px 2px 0 rgba(0, 0, 0, 0.15);\
}\
 .img_load_lh p {\
  margin: 15px 10px 0; *margin-left: 5px;\
}\
 .img_load_lh p.uComment {\
  color: #999; font-size:12px;\
}\
 .img_load_lh .choice{\
  width:300px;position:relative;border-left:1px solid #aaa;border-top:1px solid #aaa;border-right:1px solid #bbb;border-bottom:1px solid #bbb;background-color:#FFF;margin:10px;\
}\
.img_load_lh{\
display: block; width: 350px; background: #fafafa; border: 1px solid #aaa; position:absolute;z-index: 200000000;box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);border-radius: 3px;\
}\
.img_load_lh .choice span{display:block;}\
#inputUploadImg {\
  height: 30px; *height: 28px; position: absolute; right: 23px; *right: 5px; top: 53px; *top: 55px; width: 61px; *width: 58px; opacity: 0; filter:alpha(opacity=0); cursor: pointer;\
}</style><div class="img_load_lh"><div class="head"><strong class="title">'+infos[154]+'</strong><a class="close" href="#" onclick="$(\'#dialogUpImg\').remove();">×</a></div>\
    <p><table border="0" cellpadding="0" cellspacing="0"><tr><td><input id="src-input" class="comm-tbox" type="text" target="blank" value="'+infos[155]+'" onFocus="if(this.value==\''+infos[155]+'\')this.value=\'\';" onblur="if(this.value==\'\')this.value=\''+infos[155]+'\'"><input type="hidden" id="real_filename_hidden">\
        </td><td><input type="file" id="file_pic" name="userfile" onchange="to_send_file_obj.ajaxuploadfile();" style="cursor: pointer;font-size: 9px;position:absolute;width:43px;height:30px;z-index:4;top:53px;-moz-opacity: 0.0;filter: alpha(opacity=0);opacity:0;right:13px;"/><span style="background-color:#F6F6F6;border-left:1px solid #666666;border-top:1px solid #666666;border-right:1px solid #AAAAAA;border-bottom:1px solid #AAAAAA;display:block;height:29px;line-height:25px;position:absolute;right:10px;text-align:center;top:53px;*top:53px;width:46px;z-index:3;">'+infos[150]+'</span></td></tr></table></p>\
    <p class="uComment">'+infos[156]+'</p>\
    <div class="btns"><a href="#" class="btn-complete" onclick="if(to_send_file_obj.sendfiles())$(\'#dialogUpImg\').remove();">'+infos[152]+'</a><a href="#" class="btn-cancel" onclick="$(\'#dialogUpImg\').remove();">'+infos[153]+'</a></div></div></div>').appendTo(body);
  }
}

// 关闭访客端，提示是否评分，
// 点取消,取消评分 
function  window_beforeunload(){
  m_browserClose = true;
  if(typeof(lnkover)!="undefined")
  {
		
    if(lnkover==1)
    {
      lnkover=100;
      if(kfpf!=0 && !vote_true)
      {
        if(enable_talk_collection==1){
			     $.ajax({
				    type: "POST",
				    url: "impl/rpc_count.php",
				    data: "kf_id="+obj_id+"&kh_id="+myid+"&kh_up="+khtalk_up+"&kh_down="+khtalk_down+"&talk_id="+mytempid,
				    dataType: "xml",
				    success: function(data){
				    }
				    });
         }
        if(window.event) window.event.returnValue = close_bro_prompt;
        vote_open();
      }
      else
      {
        if(window.event) window.event.returnValue = close_bro_prompt;
      }
    }
    else if(lnkover==2)
    {
      lnkover = 100;
      if(window.event) window.event.returnValue=infos[28];
    }
    else if(lnkover==3 && kfpf!=0 && !vote_true)
    {
      vote_open();
    }
    else if(lnkover==200)
    {
      
    }
  }
}

// 点击评分按钮
function to_vote_open() 
{
  if(m_success==false) return;
  if(vote_true)
  {
    vote_bt = infos[39];
  }
  else
  {
    if(kfpf!=0)
    {
      vote_open();
    }
  }
}

// 创建评分冻结层 
function createVoteFreeze()
{
  var obj = document.getElementById("vote_freeze");
  if(obj!=null) return;

  var height = document.documentElement.clientHeight;
  var width = document.documentElement.clientWidth;
  createFreeze("vote_freeze", 0, 0, height, width);
  createVoteDiv(height, width);
  try
  {
    window.focus();
  }
  catch(e){}
}

// 创建评分Div
function createVoteDiv(height, width)
{
  var pf_tip="";
  if(kfpf==999){
      pf_tip=infos[145];
  }
  else{
      pf_tip=infos[146];
  }
  var vote_str = document.createElement("div");
  vote_str.id = "vote_div";

  vote_str.style.top = Math.round((height-180)/2)+"px";
  vote_str.style.left = Math.round((width-358)/2)+"px";
  vote_str.style.height = "180px";
  vote_str.style.width = "358px";
  vote_str.style.position = "absolute";
  vote_str.style.fontSize = "14px";
  vote_str.style.zIndex = 9999;
  var str = '<table width="358" height="210" border="0" cellpadding="0" cellspacing="4" background="../img/tijiao_4.gif"><tr><td height="15" align="right" valign="middle"><a href="#" onclick="cancel_vote();return false;"><img src="../img/tijiao_10.gif" width="15" height="15" border="0" /></a></td></tr>'+'<tr><td align="left" height="30" style="word-break:break-all;font-size: 12px;padding-left:5px;padding-right:5px;padding-top:10px;">'+pf_tip+'</td></tr>'+'<tr><td height="20" align="center" valign="bottom" style="font-size: 12px;color: #000000;">';
  if(width < 358) {
    vote_str.style.width = "300px";  
    vote_str.style.left = Math.round((width-300)/2)+"px";
    str = '<table width="300" height="180" border="0" cellpadding="0" cellspacing="4" background="../img/tijiao_dz8.png"><tr><td height="15" align="right" valign="middle"><a href="#" onclick="cancel_vote();return false;"><img src="../img/tijiao_dz8_2.png" width="15" height="15" border="0" /></a></td></tr><tr><td height="30" align="center" valign="bottom" style="font-size: 12px;color: #000000;">';
  }
  
  if(width == 370) {
    vote_str.style.top = Math.round((height-280)/2)+"px";
    vote_str.style.height = "183px";
	vote_str.style.borderRadius = "5px";
	vote_str.style.overflow = "hidden";
    vote_str.style.width = "292px";  
    vote_str.style.left = Math.round((width-292)/2)+"px";
    str = '<table width="292" height="185" border="0" cellpadding="0" cellspacing="4" background="../img/tijiao_dz9.png?20150826"><tr><td height="15" align="right" valign="middle"><a href="#" onclick="cancel_vote();return false;"><img src="../img/tijiao_dz8_2.png" width="12" height="12" border="0" style="margin-top:5px; margin-right:5px;" /></a></td></tr><tr><td height="30" align="center" valign="bottom" style="font-size: 12px;color: #000000;">';
  }
  
  if(width == 400) {
    vote_str.style.top = Math.round((height-280)/2)+"px";
    vote_str.style.height = "182px";
	vote_str.style.borderRadius = "5px";
	vote_str.style.overflow = "hidden";
    vote_str.style.width = "291px";  
    vote_str.style.left = Math.round((width-291)/2)+"px";
    str = '<table width="291" height="185" border="0" cellpadding="0" cellspacing="4" background="../img/tijiao_dz10.png?20150907"><tr><td height="15" align="right" valign="middle"><a href="#" onclick="cancel_vote();return false;"><img src="../img/tijiao_dz10_1.png" width="12" height="12" border="0" style="margin-top:7px; margin-right:7px;" /></a></td></tr><tr><td height="30" align="center" valign="bottom" style="font-size: 12px;color: #000000;">';
  }
  
	    var checked = "";
    if(vote_value=="0")
    {
      checked = "checked";
    }
	  str += '<input name=vote type=radio value=0 '+checked+' onclick=set_vote_value(this.value) />满意  ';
	    var checked = "";
    if(vote_value=="1")
    {
      checked = "checked";
    }
	  str += '<input name=vote type=radio value=1 '+checked+' onclick=set_vote_value(this.value) />较好  ';
	    var checked = "";
    if(vote_value=="2")
    {
      checked = "checked";
    }
	  str += '<input name=vote type=radio value=2 '+checked+' onclick=set_vote_value(this.value) />一般  ';
	    var checked = "";
    if(vote_value=="3")
    {
      checked = "checked";
    }
	  str += '<input name=vote type=radio value=3 '+checked+' onclick=set_vote_value(this.value) />较差  ';
	    var checked = "";
    if(vote_value=="4")
    {
      checked = "checked";
    }
	  str += '<input name=vote type=radio value=4 '+checked+' onclick=set_vote_value(this.value) />恶劣  ';
	  var vote_dis = "";
  if(vote_true)
  {
    vote_bt = infos[39];
    vote_dis = "disabled";
  }
	
    if(width < 358) {
        str += '</td></tr><tr><td height="60" align="center"  valign="top"><table width="85%" height="55" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 12px;color: #000000;"><tr><td width="50" align="center">'+infos[119]+'</td><td><textarea style="width:235px; height:50px" id="vote_note" name="vote_note"></textarea></td></tr></table><span style="color:red;font-size:12px;height:12px;">'+infos[120]+'</span></td></tr><tr><td height="32" align="center" valign="top"><input type="button" style="width: 78px;height: 31px;background:url(../img/tijiao_dz8_1.png) no-repeat; border:none; text-indent:100em;" '+vote_dis+' value="'+vote_bt+'" onclick="save_vote()" /></td></tr></table>';
    }else if(width == 370){
        str += '</td></tr><tr><td height="60" align="center"  valign="top"><table width="85%" height="55" border="0" align="center" cellpadding="2" cellspacing="0" style="font-size: 12px;color: #000000;"><tr><td width="50" align="center">'+infos[119]+'</td><td><textarea style="width:235px; height:50px" id="vote_note" name="vote_note"></textarea></td></tr></table><span style="color:red;font-size:12px;height:12px;">'+infos[120]+'</span></td></tr><tr><td height="32" align="center" valign="top"><input type="button" style="width: 77px;height: 30px;background:url(../img/dialog_send9.png) no-repeat; border:none; font-size:14px; color:#000;" '+vote_dis+' value="'+vote_bt+'" onclick="save_vote()" /></td></tr></table>';
    }else if(width == 400){
        str += '</td></tr><tr><td height="60" align="center"  valign="top"><table width="85%" height="55" border="0" align="center" cellpadding="2" cellspacing="0" style="font-size: 12px;color: #000000;"><tr><td width="50" align="center">'+infos[119]+'</td><td><textarea style="width:235px; height:50px" id="vote_note" name="vote_note"></textarea></td></tr></table><span style="color:red;font-size:12px;height:12px;">'+infos[120]+'</span></td></tr><tr><td height="32" align="center" valign="top"><input type="button" style="width: 78px;height: 27px;background:url(../img/btn_send1.png) no-repeat; border:none; font-size:14px; color:#fff;" '+vote_dis+' value="'+vote_bt+'" onclick="save_vote()" /></td></tr></table>';
    }else{
        str += '</td></tr><tr><td height="60" align="center"  valign="top"><table width="85%" height="55" border="0" align="center" cellpadding="0" cellspacing="0" style="font-size: 12px;color: #000000;"><tr><td width="50" align="center">'+infos[119]+'</td><td><textarea style="width:235px; height:50px" id="vote_note" name="vote_note"></textarea></td></tr></table><span style="color:red;font-size:12px;height:12px;">'+infos[120]+'</span></td></tr><tr><td height="32" align="center" valign="top"><input type="button" '+vote_dis+' value="'+vote_bt+'" onclick="save_vote()" /></td></tr></table>';
    }
    
  vote_str.innerHTML = str;
  var vote_freeze = document.getElementById("vote_freeze");
  document.body.insertBefore(vote_str, vote_freeze);
}

// 评分
function vote_open()
{
  if (obj_id==0)  
  {
    display_msg(infos[50]);  // 输出信息：尚未与客服建立对话，不能评分!
    return;
  }
  
  createVoteFreeze();
}

function set_vote_value(v)
{
  if(!vote_true)
  {
  	vote_value = v;
  }
}

var isIE = (document.all)?1:0;
var xmlhttp = null;

if(isIE)
{
  xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
else
{
  xmlhttp = new XMLHttpRequest();
}

// 取消评分
function cancel_vote()
{
  replayVote("2");//取消评分

  if(lnkover==100)
  {
    closewindow();
  }
  var obj = document.getElementById("vote_div");
  obj.parentNode.removeChild(obj);
  obj = document.getElementById("vote_freeze");
  obj.parentNode.removeChild(obj);
}

// 提交评分
function save_vote()
{
	if (myfirst_tempid == '') myfirst_tempid = mytempid;
  try
  {
    if(!vote_true)
    {
			var vote_note = document.getElementById("vote_note").value.trim();
			if(_length(vote_note) > 300)
			{
				alert(infos[121]);
				return;
			}

			var url = "vote.php";
			vote_true = true;
			
      var senddata="company_id="+company_id+"&id6d="+obj_id+"&action=vote&vote="+vote_value+"&note="+UrlEncode(vote_note)+"&temp_id="+myfirst_tempid+"&guest_id="+myid;
    
      xmlhttp.open("POST",url,false);
      //xmlhttp.setRequestHeader("Content-Length",senddata.length);
			xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
      xmlhttp.send(senddata);

      replayVote("1");//评分成功
      
      if(lnkover==3 || lnkover==100)
      {
        display_msg("<br/>"+infos[38]);
      }
      else
      {
        display_msg("<br/>"+infos[49]);
      }
    }
    else
    {
      display_msg("<br/>"+infos[39]);
    }
  }
  catch(e)
  {
    display_msg("<br/>"+infos[105]);
  }

  cancel_vote();

  // 浏览器关闭按钮被点击过则直接关闭窗口
  if(m_browserClose)
  {
    closewindow();
  }
}

// 发送注册信息
function do_send_reg(name, email, phone, qq, msn, company, addr, company_id, guest_id, id6d, zdyzc_obj)
{
  
    if(company_id<0 || guest_id<0 || m_regStat!=0 || reg_c=="" || m_hasreg>0) return;

    if(!checkInputMobile(phone))
    {
      var mobile = "";
      var phone = phone;
    }
    else
    {
      var mobile = phone;
      var phone = "";
    }

    mobile = UrlEncode(mobile);
    phone = UrlEncode(phone);
    var name = UrlEncode(name);
    var email = UrlEncode(email);
    var qq = UrlEncode(qq);
    var msn = UrlEncode(msn);
    var company = UrlEncode(company);
    var addr = UrlEncode(addr);
    var company_id = UrlEncode(company_id);
    var guest_id = UrlEncode(guest_id);
    var id6d = UrlEncode(id6d);
    try{
        if($.browser.version=="7.0"||$.browser.version=="6.0") {
		  var zdyzc_obj = jQuery.parseJSON(zdyzc_obj);
        } else {
          var zdyzc_obj = JSON.stringify(zdyzc_obj);     
        }
    }catch(e){
        var zdyzc_obj = '';
    }
    
    var zdyzc_str = UrlEncode(zdyzc_obj);
    var senddata = "action=import&name="+name+"&email="+email+"&mobile="+mobile+"&phone="+phone+"&qq="+qq+"&msn="+msn+"&company="+company+"&addr="+addr+"&company_id="+company_id+"&guest_id="+guest_id+"&id6d="+id6d+"&arg="+arg+'&guest_uid='+ucust_id+'&zdyzc_str='+zdyzc_str;

    reg_data_url = "impl/guest_info.php?"+senddata;
    /*
    xmlhttp.open("GET", url, true);
    xmlhttp.setRequestHeader("Content-Length",senddata.length);
    xmlhttp.setRequestHeader("CONTENT-TYPE","application/x-www-form-urlencoded");
    xmlhttp.send(null);

    xmlhttp.onreadystatechange = function()
    {
      if(4==xmlhttp.readyState)
      {
        if(200==xmlhttp.status)
        {
          var dom = xmlhttp.responseXML;
          var rspNodes = XMLGetNodes(xmlhttp.responseXML,'Response');
          
          if(rspNodes!=null)
          {
            var rspNode = rspNodes[0];
            var ecode = XMLGetNamedAttr(rspNode, "ecode");

            if(ecode==0)
            {
              g_comm.RegSuccess(guest_id);
            }
          }
        }
      }
    }
    */
    reg_err_fun(guest_id);
 
}
//注册失败补救
function reg_err_fun(guest_id) {
    $.ajax({
        type: "GET",
        url: reg_data_url,
        timeout:15000,
        success: function(msg) {
            g_comm.RegSuccess(guest_id);    
        },
        error: function(e) {
            setTimeout(reg_err_fun,3000,guest_id);
        }     
    });    
}

// 检查mobile
function checkInputMobile(mobile)
{
  var regx = /^1\d{10}$/;
  if(!regx.test(mobile))
  {
    return false;
  }
  return true;
}

// 提交留言
var ret = new Object();
function save_lword(zdyly_c)
{
  var url = "lword.php";
  
  if(typeof(ret.tempid)!="undefined")
  {
    mytempid = ret.tempid;
  }
  
  
  if(m_lwordObject == '0' || m_lwordObject == null){
      alert('请选择留言对象');
      return false;
  }
  m_lwordObject = m_lwordObject == 'zdgs' ? '' : m_lwordObject;

  var senddata = "action=import&company_id="+company_id+"&tempid="+mytempid+"&guest_id="+myid+"&referer=http://www.bjjfr.com/works/&referer1=&ly_mode="+m_replyMode+"&ly_object="+m_lwordObject+"&hasrobot="+chatrobot+"&talk_his_table="+talk_his_table+"&message_table="+message_table;

  var check_str = "";
  var check_flag = 0;
  var content_str = "";
  var content_flag = 0;
  var arr = zdyly_c.split(",");
  var tmp = '';
  {
    for(var i=0; i<arr.length; i++)
    {
      try
      {
    
        if(zdyly_ck.indexOf(arr[i])>-1)
        {
          if(document.getElementById("ly_"+arr[i]).value.trim()=="")
          {
            var alertinfo = "";
            if(arr[i]=="name")
            {
              alertinfo = infos[51];
            }
            else if(arr[i]=="email")
            {
              alertinfo = infos[52];
            }
            else if(arr[i]=="phone")
            {
              alertinfo=infos[53];
            }
            else if(arr[i]=="qq")
            {
              alertinfo = infos[55];
            }
            else if(arr[i]=="company")
            {
              alertinfo = infos[86];
            }
            else if(arr[i]=="addr")
            {
              alertinfo = infos[112];
            }

            alert(alertinfo);
            document.getElementById("ly_"+arr[i]).focus();
            document.getElementById("lw_sb").disabled = false;
            return false;
          }
          if(!checkLyInput(arr[i]))
          {
            return false;
          }
                    
        }
        else
        {
          if(document.getElementById("ly_"+arr[i]).value.trim()!="")
          {
            if(!checkLyInput(arr[i]))
            {
              return false;
            }
          }
        }
        senddata += "&ly_"+arr[i]+"="+UrlEncode(document.getElementById("ly_"+arr[i]).value.trim());

      }catch(e){}
    }
    /* 处理自定义注册项数据 开始*/
    try{
      if(zdyzc_checked > 0 && contact_first) {
        for(var key in zdyzc_arr) {               
            if(zdyzc_arr[key][2] == 1 && document.getElementById("ly_"+key).value.trim()=="") {
                alertinfo = infos[143];
                alert(alertinfo);
                document.getElementById("ly_"+key).focus();
                document.getElementById("lw_sb").disabled = false;
                return false;
            }else{
                if(zdyzc_arr[key][1] == 1){
                    tmp = zdyzc_arr[key][0];
                    zdyzc_obj[tmp] = document.getElementById("ly_"+key).value.trim();
                   //alert(JSON.stringify(zdyzc_obj));    
                }
            }
        }                                    
      }
     }catch(e){} 
     /* 处理自定义注册项数据 结束*/      
        if(is_ly_custom!=1 && ly_captcha !=2){
          senddata += "&ly_check_num=" + document.getElementById('ly_check_num').value.trim();
        }else{
          senddata += "&is_ly_custom=1";
        }
        
        if(zdyzc_checked > 0 && contact_first) {
            var zdyzc_str = UrlEncode(JSON.stringify(zdyzc_obj));
            senddata += "&zdyzc_str=" + zdyzc_str;     
        }
        
  }

//  if(m_lwordObject=="d#no_group")
//  {
//    alert(infos[130]);
//    return false;
//  }

  if(document.getElementById("ly_content").value.trim()=="")
  {
    alert(infos[56]);
    return false;
  }

  if(ly_captcha !=2 && is_ly_custom!=1 && document.getElementById('ly_check_num').value.trim()==""){
    alert(prompt137);
    return false;
  }
  
  if(ly_captcha !=2 && is_ly_custom!=1 && !check_num_status){
    alert(prompt138);
	replace_check_num();
    return false;
  }
  
  var postdata = senddata + "&ly_content="+UrlEncode(document.getElementById("ly_content").value.trim().replace(/(<)/gim,"&lt;").replace(/(>)/gim,"&gt;").replace(/(\r\n)/gim,"<br/>"));
  if(contact_first)
  {
    var postdata = senddata + "&ly_first=true&iscard="+m_cardImport+"&m_lyszc="+m_lyszc+"&ly_content="+UrlEncode(document.getElementById("ly_content").value.trim().replace(/(<)/gim,"&lt;").replace(/(>)/gim,"&gt;").replace(/(\r\n)/gim,"<br/>"));
    contact_first = false;
  }

  xmlhttp.open("POST", url, false);
  //xmlhttp.setRequestHeader("Content-Length", postdata.length);
  xmlhttp.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
  xmlhttp.send(postdata);

  if(origin_type == '1'){
    sendkafka('type','1','-1',origin_time);
    origin_type = 0;
  }
  if(talk_type != '1'){
    talk_type = 1;
    sendkafka('type','1','1');
  }

  var restxt = xmlhttp.responseText;

  var suc_msg = infos[97]+"<a href='#' onclick='continuelword();return false;' style='font-size:14px;'>"+infos[98]+"</a>";

  document.getElementById("res_tip").innerHTML = suc_msg;
  document.getElementById("res_leaveword").style.display = "block";
  document.getElementById("part_leaveword").style.display = "none";
  
  document.getElementById("lw_sb").value = infos[95]; 
  document.getElementById("lw_sb").onclick = function(){try{save_lword('')}catch(e){}};  

  document.getElementById("ly_content").readOnly = false;
  document.getElementById("ly_content").value = "";

  ret = str_to_obj(restxt);
  if(parseInt(ret.guestid)>0)
  {
    myid = ret.guestid;
    try 
    {
      setCookie2("guest_id", myid);
      setFlashGid();
    }catch(e){}
  }
  is_bind = 0;
}

function continuelword()
{
  document.getElementById("part_leaveword").style.display = "block";
  document.getElementById("res_leaveword").style.display = "none";
  document.getElementById("ly_items").innerHTML = UBBCode(UBBEncode(lword_prompt));
  document.getElementById("ly_items").innerHTML += "<table border='0' cellpadding='0' cellspacing='0' class='leaveword_tb'>"+lwordstr_ly + lwordstr_submit+"</table>";
  replace_check_num();
  showImgCode();
}

// 检查输入项
function checkLyInput(inputName)
{
  if(inputName=="email")
  {
    if(!document.getElementById("ly_"+inputName).value.trim().IsEmail())
    {
      alert(infos[109]);
      document.getElementById("ly_"+inputName).focus();
      document.getElementById("lw_sb").disabled = false;
      return false;
    }
  }
  if(inputName=="phone")
  {
    if(!document.getElementById("ly_"+inputName).value.trim().IsTelephone2())
    {
      alert(infos[54]);
      document.getElementById("ly_"+inputName).focus();
      document.getElementById("lw_sb").disabled = false;
      return false;
    }
  }
  if(inputName=="msn")
  {
    if(!document.getElementById("ly_"+inputName).value.trim().IsEmail())
    {
      alert(infos[110]);
      document.getElementById("ly_"+inputName).focus();
      document.getElementById("lw_sb").disabled = false;
      return false;
    }
  }
  return true;
}

//str:  a:1;b:2;c:3
//obj:  obj.a=1,obj.b=2,obj.c=3
function str_to_obj(str)
{
  var tmp  = new Object(); //split by ;
  var tmp2 = new Object(); //split by :
  var ret  = new Object(); //return object
  tmp = str.split(";");
  for(var i=0; i<tmp.length; i++)
  {
    tmp2 = tmp[i].split(":");
    ret[tmp2[0]] = tmp2[1];
  }
  
  return ret;
}

function saveas()
{
  if(lnkover==1 || lnkover==3 || lnkover==100)
  {
    if (myfirst_tempid == '') myfirst_tempid = mytempid;
    try
    {
      var savestyle='<style type="text/css"> <!--body{margin: 0px; padding: 0px 0px 0px 0px; border: 0px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma;}td { font-family: Tahoma; font-size: 9pt; }p { margin-top:0px;margin-bottom:0px;FONT-SIZE: 9pt; FONT-FAMILY: Tahoma; }.dialog_content{ width:471px; height:276px;border:2px solid #e3ebf8;background:url(http://www.53kf.com/img/dialog_content_bg.gif) 100% 100% no-repeat #fff; word-wrap: break-word; word-break: break-all; font-size:14px;padding-left:5px;padding-top:5px; text-align:left;}--></style>';
      var time=new Date();
      var filename=time.toLocaleDateString();
      filename=filename+" "+cname+".htm";
      var winSave=window.open('http://'+host+'/impl/rpc_download_html.php?company_id='+company_id+'&tempid='+myfirst_tempid+'&lang='+locate+'&message_table='+message_table+'&filename='+UrlEncode(filename),'_blank','top=10000');
    }
    catch(e){}
  }
} 

function chatRobot()
{
	try
  {
    var httprequest = createHttpRequest();
    if(httprequest!=null)
    {
      var senddata = "company_id="+company_id+"&tempid="+mytempid+"&chatrobot=1&talk_his_table="+talk_his_table+"&message_table="+message_table;

      var url = "lword.php";
      httprequest.open("POST", url, true);
     // httprequest.setRequestHeader("Content-Length", senddata.length);
      httprequest.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
			httprequest.send(senddata);

      httprequest.onreadystatechange = function()
      {
        if(4==httprequest.readyState)
        {
          if(200==httprequest.status)
          {
                chatrobot = httprequest.responseText;
          }
        }
      }
    }
  }
  catch(e){}
}

// 设置talk_last_time
function set_talk_last_time()
{
	if(company_id<=0 || mytempid<=0) return;
	try
	{
    var httprequest = createHttpRequest();
    if(httprequest!=null)
    {
      var url = "impl/rpc_set_time.php";
      var senddata = "check_id=11917718fe939f3106d35a30074bcd30&company_id="+company_id+"&temp_id="+mytempid+"&talk_his_table="+talk_his_table;

      httprequest.open("POST", url, true);
      //httprequest.setRequestHeader("Content-Length", senddata.length);
      httprequest.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
      httprequest.send(senddata);

      httprequest.onreadystatechange = function()
      {
        if(4==httprequest.readyState)
        {
          if(200==httprequest.status)
          {
           
          }
        }
      }
    }
  }
  catch(e){}
}

// 设置conn_prompt
function set_conn_prompt(cp)
{
	if(company_id<=0 || mytempid<=0) return;
	try
	{
    var httprequest = createHttpRequest();
    if(httprequest!=null)
    {
      var url = "impl/rpc_set_prompt.php";
      var senddata = "check_id=11917718fe939f3106d35a30074bcd30&company_id="+company_id+"&temp_id="+mytempid+"&conn_prompt="+UrlEncode(cp)+"&message_table="+message_table;

      httprequest.open("POST", url, true);
     // httprequest.setRequestHeader("Content-Length", senddata.length);
      httprequest.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
      httprequest.send(senddata);

      httprequest.onreadystatechange = function()
      {
        if(4==httprequest.readyState)
        {
          if(200==httprequest.status)
          {

          }
        }
      }
    }
  }
  catch(e){}
}

// 获取名片
function get_user_card()
{
 try
  {
    var httprequest = createHttpRequest();
    if(httprequest!=null)
    {
      var url = "impl/rpc_user_card.php";
      var senddata = "check_id=11917718fe939f3106d35a30074bcd30&company_id="+company_id+"&guest_id="+myid;

      httprequest.open("POST", url, true);
    //  httprequest.setRequestHeader("Content-Length", senddata.length);
      httprequest.setRequestHeader("CONTENT-TYPE", "application/x-www-form-urlencoded");
      httprequest.send(senddata);

      httprequest.onreadystatechange = function()
      {
        if(4==httprequest.readyState)
        {
          if(200==httprequest.status)
          {
		
			var dom = httprequest.responseXML;

			var workerArray = new Array();
			var list_cnt = 0;

			var rowList = XMLGetNodes(dom, "row");

			var row = XMLGetNode(rowList, 0);
			name = XMLGetNamedAttr(row, "name");
			mobile = XMLGetNamedAttr(row, "mobile");
			email = XMLGetNamedAttr(row, "email");
			phone = XMLGetNamedAttr(row, "phone");
			qq = XMLGetNamedAttr(row, "qq");
			msn = XMLGetNamedAttr(row, "msn");
			company = XMLGetNamedAttr(row, "company");
			addr = XMLGetNamedAttr(row, "addr");

			if(mobile!="") phone = mobile;
			
			set_ly_items_value(name, email, phone, qq, msn, company, addr);
          }
        }
      }
    }
  }
  catch(e){}
}

// 设置部分留言项只读
function set_ly_items_disabled()
{
	if(reg_c.indexOf("name")>-1)
	{
		document.getElementById("ly_name").disabled = true;
	}
	if(reg_c.indexOf("qq")>-1)
	{
		document.getElementById("ly_qq").disabled = true;
	}
	if(reg_c.indexOf("msn")>-1)
	{
		document.getElementById("ly_msn").disabled = true;
	}
	if(reg_c.indexOf("company")>-1)
	{
		document.getElementById("ly_company").disabled = true;
	}
	if(reg_c.indexOf("addr")>-1)
	{
		document.getElementById("ly_addr").disabled = true;
	}
}
//设置留言对象
function set_ly_obj(obj){
    m_lwordObject = obj;
}
// 设置下拉框选项
function setObjectSelectOption(options)
{
    if(options.status == 'error'){
        $('#object_select').append('<option value="zdgs">公司</option>');
        m_lwordObject = 'zdgs';
        return;
    }
    if(ly_assign_type == '0' && ly_assign_obj == 'zdfz'){
        m_lwordObject = 'g#' + options[0].group_id;
        for(var i = 0;i<options.length;i++){
            $('#object_select').append('<option value="g#'+options[i].group_id+'">'+options[i].group_name+'</option>');
        }
    }
    if(ly_assign_type == '0' && ly_assign_obj == 'zdkf'){
        m_lwordObject = '0';
        for(var group_id in options){
          if(options[group_id].group_name == undefined){
            continue;
          }
          $('#object_select').append('<option value="0">--------'+options[group_id].group_name+'--------</option>');
          var workers = options[group_id].workers;
          for(var id6d in workers){
                $('#object_select').append('<option value="w#'+workers[id6d].id6d+'">'+workers[id6d].name+'</option>');
            }
        }
    }
    if(ly_assign_type == '1' && ly_assign_obj == 'zdfz'){
        m_lwordObject = 'g#' + options.group_id;
        $('#object_select').append('<option value="g#'+options.group_id+'">'+options.group_name+'</option>');
    }
    if(ly_assign_type == '1' && (ly_assign_obj == 'zdkf' || ly_assign_obj == 'zbkf')){
        m_lwordObject = 'w#' + options.id6d;
        $('#object_select').append('<option value="w#'+options.id6d+'">'+options.name+'</option>');
    }
}

function window_unload()
{
	try{document.cookie = "hz6d_open_talk_"+company_id+"=0";}catch(e){}
	if(m_setTalkLastTime) set_talk_last_time();
}

function first_get()
{
	if(getCookie2("guest_id")!="")
  {
    myid = getCookie2("guest_id");
  }
}

//更换验证码
function replace_check_num(){
    $('#check_img').attr("src","include/ImgCode.php?"+parseInt(10000*Math.random()));
    $('#is_ok').hide();
    $('#ly_check_num').val("");
    check_num_status = 0;
}
//验证码图片显示
function showImgCode(){
    $("#ly_check_num").click(function(evt){
      stopPro(evt);
    }).focus(function(){
      imgCodeVisible();
    });
    
    $("#check_img").click(function(evt){
      stopPro(evt);
    });
    
    $("#refresh_img").click(function(evt){
      stopPro(evt);
      replace_check_num();
      imgCodeVisible();
    });

    $(document).click(function(){
      $("#check_img").css('visibility','hidden');             
    });
}
function stopPro(evt){
    var evt = evt ? evt : (window.event ? window.event : null);
    evt.stopPropagation ? evt.stopPropagation() : (evt.cancelBubble=true);
}
function imgCodeVisible(){
    var check_img_top = parseInt($("#ly_check_num").parent().position().top - $("#ly_check_num").position().top - 116);
    $("#check_img").css("top",check_img_top);
    $("#check_img").css('visibility','visible');
}
/* 验证码 开始*/
var is_bind = 0;
function return_check_status(){
    if(!is_bind){
        is_bind = 1;
        var input_dom = $('#ly_check_num');   
      //返回验证码状态   
        input_dom.keyup(function(){ 
            if(input_dom.val().length == 4){
                $.ajax({
                    type: "GET",
                    url: "include/check_num_status.php?check_num="+input_dom.val(),
                    success: function(msg){
                        $('#is_ok').show();
                        if(msg == 'right'){
                            check_num_status = 1;
                            $('#is_ok').attr("src","img/check_right.gif");
                        }else{
                            check_num_status = 0;
                            $('#is_ok').attr("src","img/check_wrong.gif");
                        }
                    }
                });  
            }else{
                check_num_status = 0;
                $('#is_ok').attr("src","").hide();               
            }
        });   
    }  
}
/* 验证码 结束*/
// 获取cookie
function getCookie3(name)
{
  var search = name+"=";
  if(document.cookie.length>0)
  {
    offset = document.cookie.indexOf(search);
    if(offset!=-1)
    {
      offset += search.length
      end = document.cookie.indexOf(";", offset)
      if(end==-1)
      {
        end = document.cookie.length;
      }
      return decodeURI(document.cookie.substring(offset, end));
    } 
  }
  return "";
}
</script>
<script for="document" event="onfocusout">
  imfocus = 0;
</script>
<script for="document" event="onfocusin">
  imfocus = 1;
</script>

<script type="text/javascript">
  setTimeout(function(){
    try{
      if(m_startInitial==false){
        insertErrorInfos2("2", "initial", "call initial() failed!"+talkpage);
      }
    }catch(e){}
  }, 8000);
</script>
<script type="text/javascript" for="snapShot_obj" event="OnSend(a,b,c)">ocx_callback(a,b,c);</script>
<script src="./saved_resource" type="text/javascript"></script>
﻿<style>
.dialog_content{
	overflow: auto;
}
#robot_input_tips{
	z-index: 1000; position: absolute; cursor: pointer; padding: 10px 0; bottom: 85px; left: 20px; background-color: #FFF; border: 1px solid #6f90ca; word-break: break-all; word-wrap: break-word;
}
#robot_input_tips p{
	margin: 0; padding: 0 10px; height: 25px; line-height: 25px; overflow: hidden;
}
.greetings_init ul li{
	line-height: 20px;
}
.greetings_init ul li a{
	color: #1A8ECE;
}
.greetings_init ul li a:hover{
	color: #1A8ECE;
}
.greetings_init ul li span{
	color: #1ABECE;
}
/*气泡样式*/
#new_box-main-l-disp{
	font: 12px "Microsoft Yahei",simsun,sans-serif; color: #333;
}
#new_box-main-l-disp .new_mnkf_dialog_send{
	text-align: right;
}
#new_box-main-l-disp .new_mnkf_dialog_send, #new_box-main-l-disp .new_mnkf_dialog_receive{
	margin:7px 15px 0;
}
#new_box-main-l-disp .new_mnkf_dialog_send .time, #new_box-main-l-disp .new_mnkf_dialog_receive .time{
	font-weight: normal; font-size: 12px; line-height: 24px; color: #999;
}
#new_box-main-l-disp .new_mnkf_dialog_send .msgbox{
	background: none repeat scroll 0 0 #EFF3FC;
}
#new_box-main-l-disp .new_mnkf_dialog_receive .msgbox{
	background: none repeat scroll 0 0 #D7EEF6;
}
#new_box-main-l-disp .dialog_arrow{
	bottom: 6px; display: block; height: 11px; overflow: hidden; position: absolute; width: 7px;
}
#new_box-main-l-disp .new_mnkf_dialog_receive .dialog_arrow{
	background-color: #F3F3F3; left: -8px; top: 0;
}
#new_box-main-l-disp .new_mnkf_dialog_send .dialog_arrow{
	right: -8px; top: 0;
}
#new_box-main-l-disp .new_mnkf_dialog_send .msgbox{
	border-radius: 7px; border-top-right-radius: 0; display: inline-block; max-width: 1000px; padding: 10px 15px; position: relative; text-align: left; word-break: break-all; word-wrap: break-word; font-size:12px;
}
#new_box-main-l-disp .new_mnkf_dialog_receive .msgbox{
	border-radius: 7px; border-top-left-radius: 0; display:inline-block; max-width: 1000px; padding: 10px 15px; position: relative; text-align: left; word-break: break-all; word-wrap: break-word; font-size: 12px;
}
 #new_box-main-l-disp .new_mnkf_dialog_send em{
	border-color: #EFF3FC #FFFFFF #FFFFFF #EFF3FC; border-style: solid; border-width: 4px 4px; height: 0; width: 0;
}
 #new_box-main-l-disp .new_mnkf_dialog_receive em{
	border-color: #D7EEF6 #D7EEF6 #FFFFFF #FFFFFF; border-style: solid; border-width: 4px 4px; height: 0; width: 0;
}
#new_box-main-l-disp p.answer_tickling, #new_box-main-l-disp p.answer_reason{
	font:normal 12px/14px Arial,"宋体"; margin: 5px; padding-left: 10px; text-align: right; position: relative; bottom: -5px;
}
#new_box-main-l-disp p.answer_reason label{
	margin-right: 5px;
}
 #new_box-main-l-disp p.answer_reason input{
	position: relative; top: 2px;
}
#new_box-main-l-disp p.answer_tickling img{
	width: 18px; height: 18px; position: relative; top: 5px; margin-right: 3px;
}
#new_box-main-l-disp p.answer_tickling a:hover{
	text-decoration: none; cursor: pointer; color: #333;
}
#new_box-main-l-disp p.answer_tickling a.answer_helpful{
	margin:0 10px; background:url(../minkh/style/good-mark.png?201405141515) no-repeat 13px 0; width: 30px; height: 16px; display: inline-block; text-align: left;
}
#new_box-main-l-disp p.answer_tickling a.answer_useless{
	background:url(../minkh/style/bad-mark.png?201405141515) no-repeat 13px 0; width: 30px; height: 16px; display: inline-block; text-align: left;
}
</style>
<div class="dialog_content" id="new_box-main-l-disp" style="display:none;">
	<div class="robot_images" style="float:left;">
		<img src="http://www7.53kf.com/webCompany.php?arg=9005190&amp;style=1&amp;kflist=off&amp;kf=gl-002%2Cgl-004%2Cgl-009%2Cgl-001%2Cgl-007%2Cgl-003%2C237084399%40qq.com&amp;zdkf_type=1&amp;language=zh-cn&amp;charset=gbk&amp;username=&amp;userinfo=&amp;introurl=&amp;lyurl=&amp;lytype=0&amp;copartner=&amp;referer=http%3A%2F%2Fwww.bjjfr.com%2Fworks%2F&amp;keyword=&amp;brief=&amp;logo=&amp;question=&amp;tfrom=2&amp;tpl=minichat2&amp;timeStamp=1472697968458&amp;interface_color=9&amp;interface_theme=8&amp;minchat_style=1" width="64" height="64">
	</div>
	<div id="greetings_init" class="greetings_init" style="float:left;margin-left:10px;">
		<span style="display:block;">您好！我是智能机器人 </span>
		<span style="display:block;margin-top:10px;"></span>
				<ul style="padding:0;margin:0;list-style:none;">
					</ul>
	</div>
	<div style="clear:both;"></div>
</div>
<div id="robot_input_tips" style="display:none;"></div>
<!-- 机器人的新界面代码开始 -->
<script type="text/javascript">
	var robot_id = "";
	var robot_prompt = "";
	var robot_un_prompt = "";
	var robot_name = "";
	var robot_icon_url = "";
	var com_id = "70777085";
	var robot_dialog = document.getElementById("new_box-main-l-disp");
	var parent_dialog = document.getElementById("box-main-l-disp").parentNode;
	var part_input = document.getElementById("part_input_content");
	var input_area = document.getElementById("input1");
	var robot_input_tips = document.getElementById("robot_input_tips");

	if (zsk_state == 1 && online_cnt == 0 && m_robid != "") {
		var now = new Date();
	    var exitTime = now.getTime() + 5000;
		input_area.onkeyup = function() {
			now = new Date();
			if (now.getTime() > exitTime) {
				var word = input_area.value;
				if (word != "") {
					get_tips(word);
				} else {
					robot_input_tips.style.display = "none";
				}
				exitTime = now.getTime() + 1000;
			}
		};
		document.getElementById("box-main-l-disp").style.display = "none";
		parent_dialog.appendChild(robot_dialog);
		part_input.parentNode.insertBefore(robot_input_tips, part_input);
		document.getElementById("new_box-main-l-disp").style.display = "block";
	}

	function robot_main(question) {
		$.ajax({
			url: "fenci/robot_fenci.php",
			dataType:"json",
			data: {cmd: "UQR", com_id: com_id, robot_id: robot_id, question: question},
			success: function(result) {
				if (result != null && result["q_id"] != "0") {
					var robot_answer = result["answer"];
					var q_id = result["q_id"];
					show_robot_dialog(q_id, question, robot_answer);
				} else {
					show_robot_dialog("0", question, robot_un_prompt);
				}
			}
		});
	}
	
	//获得输入提示
	function get_tips(word) {
		$.ajax({
			url: "fenci/robot_fenci.php",
			data: {cmd: "ACQ", com_id: com_id, robot_id: robot_id, word: word},
			success: function(result) {
				var result = eval("(" + result + ")");
				var rows = result.rows;
				var q_list = "";
				for (var i = 0; i < result.total; i++) {
					var question = rows[i]["question"];
					var answer = rows[i]["answer"];
					var q_id = rows[i]["q_id"];
					q_list = q_list + "<p onclick=\"show_robot_dialog('" + q_id + "', '" + question + "', '" + answer + "')\">" + question + "</p>";
				}
				if (q_list != ""){
					robot_input_tips.innerHTML = q_list;
					robot_input_tips.style.display = "block";
				} else {
					robot_input_tips.style.display = "none";
				}
			}
		});
	}
	
	//用户反馈接口
	function customer_response(q_id, val) {
		if (q_id != "0") {
			$.ajax({
				url: "fenci/robot_fenci.php",
				data: {cmd: "CR", com_id: com_id, robot_id: robot_id, q_id: q_id, val: val},
				success: function(result) {
					;
				}
			});
		}
	}
	
	//对话接口
	function show_robot_dialog(q_id, question, answer) {
	    stop_beforeunload = 1;//阻止clickc触发IE beforeunload事件
		customer_response(q_id, 5);
		question_dialog(question);
		answer_dialog(q_id, answer);
        if(chatrobot==1) chatRobot(); //统计机器人次数
		clear_inner();
		scrollToBottomRobot();
		if(origin_type == '1'){
		    sendkafka('type','1','-1',origin_time);
		    origin_type = 0;
		}
		if(talk_type != 2){
			talk_type = 2;
			sendkafka('type','1','1');
		}
	}
	//追加
	function insertAfter(newElement, targetElement){
		var parent = targetElement.parentNode;
		if (parent.lastChild == targetElement){
			parent.appendChild(newElement);
		}
		else{
			parent.insertBefore(newElement, targetElement.nextSibling);
		}
	}
	//问题
	function question_dialog(question){
		var robot_dialog_lastchild = robot_dialog.lastChild,
			new_mnkf_dialog_send = document.createElement('div');
			new_mnkf_dialog_send.className = 'new_mnkf_dialog_send';
			new_mnkf_dialog_send.innerHTML = '<p class="time">我&nbsp;说：</p><div class="msgbox">'+question+'<em class="dialog_arrow"></em></div>';
		insertAfter(new_mnkf_dialog_send, robot_dialog_lastchild);
	}
	//答案
	function answer_dialog(q_id, answer){
		var robot_dialog_lastchild = robot_dialog.lastChild,
			new_mnkf_dialog_receive = document.createElement('div');
			new_mnkf_dialog_receive.className = 'new_mnkf_dialog_receive';
			if(q_id != '0'){
				new_mnkf_dialog_receive.innerHTML = '<p class="time">'+robot_name+'&nbsp;说：</p><div class="msgbox" id="'+q_id+'">'+answer+'<em class="dialog_arrow"></em><p class="answer_tickling">此回答对您有帮助吗？<a class="answer_helpful" value="4">有</a><a class="answer_useless">无</a><span style="display:none;">感谢您的反馈&nbsp;&nbsp;<img src="../minkh/style/check_alt.png?201405141515" /></span></p><p class="answer_reason" style="display:none;">请选择原因：<input type="radio" name="answer_resion_btn" value="0"/><label>简单</label><input type="radio" name="answer_resion_btn" value="1" /><label>复杂</label><input type="radio" name="answer_resion_btn" value="2"/><label>无关</label><input type="radio" name="answer_resion_btn" value="3"/><label>其他</label></p></div></div>';
			}else{
				new_mnkf_dialog_receive.innerHTML = '<p class="time">'+robot_name+'&nbsp;说：</p><div class="msgbox" id="'+q_id+'">'+answer+'<em class="dialog_arrow"></em></div></div>';
			}
		insertAfter(new_mnkf_dialog_receive, robot_dialog_lastchild);
	}
	//清空
	function clear_inner(){
		robot_input_tips.innerHTML = '';
		robot_input_tips.style.display = 'none';
		input_area.value = '';
	}
	// 滚动条置底
	function scrollToBottomRobot(){
		try{
			setTimeout(function(){
				document.getElementById('new_box-main-l-disp').scrollTop = document.getElementById('new_box-main-l-disp').scrollHeight;
			}, 1);
		}catch(e){}
	}
	$(function(){
		$('.answer_tickling > a').live('click', function(event){
			var event = event || window.event,
				target = event.target || event.srcElement;
			if(target.className == 'answer_helpful'){
				var answer_reason_val = $(this).attr('value'),
					answer_id = $(this).parent().parent().attr('id');
				customer_response(answer_id, answer_reason_val);
				$(this).hide();
				$(this).siblings('a').hide();
				$(this).siblings('span').show();
			}else if(target.className == 'answer_useless'){
				$(this).parent().siblings('p').show();
				scrollToBottomRobot();
			}
		});
		$('.answer_reason > input[type="radio"]').live('click', function(event){
			var event = event || window.event,
				answer_reason_val = $(this).val(),
				answer_id = $(this).parent().parent().attr('id');
			$(this).parent().hide();
			$(this).parent().siblings('p').find('a').hide();
			$(this).parent().siblings('p').find('span').show();
			customer_response(answer_id, answer_reason_val);
		});
		$('#robot_input_tips').find('p').live('mouseover mouseout', function(event){
			var event = event || window.event;
			if (event.type == 'mouseover') {
				$(this).css('background-color','#F2F2F2');
			} else {
				$(this).css('background-color','#FFF');
			}
		})
	});
</script>
<!-- 机器人的新界面代码结束 -->
</body></html>